I have a .NET 4.0 web site which was coded in Visual Studio 2010.
I installed the VS11 beta last night, and am using that to work on the web site today. I did NOT change the web site to be .NET 4.5, it is still 4.0.
I have a number of custom libraries which I’ve written, and use in most of my projects (db access, LINQ extensions, etc.). I have them all <system.web><pages><namespaces><add/>ed in the web.config of my project so that I don’t need to put an Import line at the top of every file where I want to use things from them.
This all works fine and as expected in VS2010, and in VS11 it all works fine, … EXCEPT for one single exception. ONE and ONLY one of my custom libraries, when I have it included in the web.config, the design-time compiler outputs an error message to the Error List window stating:
Error: The namespace 'MyLibraries.LIB' is not a valid identifier.
All my other libraries continue to work fine, just as they did in VS2010. I thought maybe there was an invisible character embedded in the file or something, so took out the whole <add/> line for that namespace and retyped it from scratch. No joy. I’ve also tried removing the DLL (and associated files) from the bin directory and re-adding them, also with no change.
Turns out this wasn’t so much a problem with VS11 itself, but with the Framework 4.5.
I uninstalled VS11 and VS2010 still had the same problem.
I then saw that uninsting VS11 did NOT uninstall .NET 4.5, so I uninstalled that, and then 2010 was good.