If you create a new Console App in Visual Studio 2010, and you want to reference System.Web, you might start scratching you head. Why?
Looks like Visual Studio 2010 creates new Console Apps targeting the .NET Framework 4 Client Profile instead of the .NET Framework 4. Why? No idea, but you can change it and then reference System.Web
You can change the setting by going to Properties on your project, then the Application tab, and changing the drop down of the Target Framework to .NET Framework 4
4 replies on “Visual Studio 2010: Console App, Where is my System.Web?”
It’s the default for desktop apps as well — I just learned that one about two weeks ago for a project at work. Good post!
LikeLike
thanks man š saved few hours..
LikeLike
Waooooooooo, thank you very very very much… I lost 2 hours because of this problem >.< (I'm learning C# .NET =D )
LikeLike
thanks man…saved few hours…
LikeLike