I have two projects in the same solution, VS2k10. One is a class library, it references System.Web and System.Configuration, and the other is a console app, that references the first class library project. It fails to see the namespace or assembly of the class library, even though I have added it as a project reference, and even tried adding as a file assembly reference. I’ve tracked it down to the moment I add the System.Web reference to the class library (and add a class file that uses this namespace).
I have modified the target of the console app to be the full .NET 4 Framework (not just the Client Profile).
Any suggestions for why this is happening? What’s weirder is that I’m certain I’ve had this working at an earlier point in the development of both projects.
It is most definitely possible (I’ve used console apps to use the HTTPUtility class before, in System.Web). Try adding the System.Web reference to your console program too, make sure the namespace is imported/using in the class file your editing.
Check again the class library and console are both running .NET4Full rather than something else, and that you’ve added references to the v4 DLLs for System.Web and no the v2 ones by accident.
Either way, it sounds like Visual Studio misbehaving, try restarting,