.NET 3.5 and Visual Studio 2005 (I know it can be done...) [modified]
-
Hello, I'm currently using Visual Studio 2005 SP1 with .NET Framework 2.0 on Windows XP SP2. I'd like to use some new features of .NET 3.5 (such as the HashSet collection). I'm not at all interested in Linq right now. When I install the SDK and runtime for .NET 3.5 and add a reference to System.Core.dll to my current WinForms project, my code stops compiling with the following error: 1>file.cpp(195) : fatal error C1001: An internal error has occurred in the compiler. 1>(compiler file 'F:\SP\vctools\compiler\utc\src\P2\main.c[0x10BD003B:0x00000030]', line 182) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1>Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information Needless to say, the help options weren't all that helpful :) If we remove the reference to System.Core.dll, then the code compiles again. The line it points to worked just fine before, and it's just a simple String^ concatenation using the + operator. Are there any settings I need to change in Visual Studio to get the compiler to use .NET 3.5 correctly? I've seen a lot of posts saying the .NET 3.5 will work in VS2005, you just can't use the new syntax. I'm not interested in syntax, just new collection types right now. I'd prefer to stick with VS2005 (considering I purchased this copy about 6 months ago) if at all possible rather than pay for VS2008 now. I'd appreciate any suggestions anyone has, dybs
modified on Thursday, July 31, 2008 1:33 PM
-
Hello, I'm currently using Visual Studio 2005 SP1 with .NET Framework 2.0 on Windows XP SP2. I'd like to use some new features of .NET 3.5 (such as the HashSet collection). I'm not at all interested in Linq right now. When I install the SDK and runtime for .NET 3.5 and add a reference to System.Core.dll to my current WinForms project, my code stops compiling with the following error: 1>file.cpp(195) : fatal error C1001: An internal error has occurred in the compiler. 1>(compiler file 'F:\SP\vctools\compiler\utc\src\P2\main.c[0x10BD003B:0x00000030]', line 182) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1>Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information Needless to say, the help options weren't all that helpful :) If we remove the reference to System.Core.dll, then the code compiles again. The line it points to worked just fine before, and it's just a simple String^ concatenation using the + operator. Are there any settings I need to change in Visual Studio to get the compiler to use .NET 3.5 correctly? I've seen a lot of posts saying the .NET 3.5 will work in VS2005, you just can't use the new syntax. I'm not interested in syntax, just new collection types right now. I'd prefer to stick with VS2005 (considering I purchased this copy about 6 months ago) if at all possible rather than pay for VS2008 now. I'd appreciate any suggestions anyone has, dybs
modified on Thursday, July 31, 2008 1:33 PM
I don't know how to do this. I assume you would have to tell the compiler not to reference mscorlib.dll, but I'm not even sure about that. If it's just the collections you're interested in, have you looked at the free Wintellect.PowerCollections[^]? We've been using that in our .NET 2 app and the functionality supercedes even the LINQ + new collections in .NET 3.5.
-
I don't know how to do this. I assume you would have to tell the compiler not to reference mscorlib.dll, but I'm not even sure about that. If it's just the collections you're interested in, have you looked at the free Wintellect.PowerCollections[^]? We've been using that in our .NET 2 app and the functionality supercedes even the LINQ + new collections in .NET 3.5.
Thanks for the link, this looks very promising. I'll test it out first thing tomorrow. As for referencing mscorlib.dll...this may be a dumb question, but mscorlib does not appear in my current list of references on my WinForms project (although System.dll, and other System.x.dll references are added). Is mscorlib.dll not required for WinForms projects? Dybs
-
Thanks for the link, this looks very promising. I'll test it out first thing tomorrow. As for referencing mscorlib.dll...this may be a dumb question, but mscorlib does not appear in my current list of references on my WinForms project (although System.dll, and other System.x.dll references are added). Is mscorlib.dll not required for WinForms projects? Dybs
If you project is a C# project, you would need to go into the advanced options inside the project properties and check "Do not reference mscorlib.dll". But, as I said, I don't know for sure whether this is needed. It seems it would be need only if mscorlib has changed from .NET 2 to .NET 3.5. I don't think it has.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Upon this disciple I'll build my new religion? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
If you project is a C# project, you would need to go into the advanced options inside the project properties and check "Do not reference mscorlib.dll". But, as I said, I don't know for sure whether this is needed. It seems it would be need only if mscorlib has changed from .NET 2 to .NET 3.5. I don't think it has.
Tech, life, family, faith: Give me a visit. I'm currently blogging about: Upon this disciple I'll build my new religion? The apostle Paul, modernly speaking: Epistles of Paul Judah Himango
-
I don't know how to do this. I assume you would have to tell the compiler not to reference mscorlib.dll, but I'm not even sure about that. If it's just the collections you're interested in, have you looked at the free Wintellect.PowerCollections[^]? We've been using that in our .NET 2 app and the functionality supercedes even the LINQ + new collections in .NET 3.5.
I've been using PowerCollections quite a bit recently. My most common usages have been Algorithms.TypedAs - very handy for converting non-generic collections to generic ones; and Pair. Not needed to use the other data structures much yet. But the library is a handy tool to be aware of and slots nicely into the BCL. I've also looked very briefly at The C5 Generic Collection Library[^], which was covered on Channel9 a while back. But this is more complex and less well documented, e.g., no XML comments.
Kevin
-
Hello, I'm currently using Visual Studio 2005 SP1 with .NET Framework 2.0 on Windows XP SP2. I'd like to use some new features of .NET 3.5 (such as the HashSet collection). I'm not at all interested in Linq right now. When I install the SDK and runtime for .NET 3.5 and add a reference to System.Core.dll to my current WinForms project, my code stops compiling with the following error: 1>file.cpp(195) : fatal error C1001: An internal error has occurred in the compiler. 1>(compiler file 'F:\SP\vctools\compiler\utc\src\P2\main.c[0x10BD003B:0x00000030]', line 182) 1> To work around this problem, try simplifying or changing the program near the locations listed above. 1>Please choose the Technical Support command on the Visual C++ 1> Help menu, or open the Technical Support help file for more information Needless to say, the help options weren't all that helpful :) If we remove the reference to System.Core.dll, then the code compiles again. The line it points to worked just fine before, and it's just a simple String^ concatenation using the + operator. Are there any settings I need to change in Visual Studio to get the compiler to use .NET 3.5 correctly? I've seen a lot of posts saying the .NET 3.5 will work in VS2005, you just can't use the new syntax. I'm not interested in syntax, just new collection types right now. I'd prefer to stick with VS2005 (considering I purchased this copy about 6 months ago) if at all possible rather than pay for VS2008 now. I'd appreciate any suggestions anyone has, dybs
modified on Thursday, July 31, 2008 1:33 PM
Perhaps compile that part into a DLL using the command-line compiler? So far I've found that HashSet is the only compelling reason to switch to .net 3.5 (and VS 2008).