Walter
Walter

Reputation: 113

System.Web.UI not available in console app?

Im trying to write a quick console app that outputs data to an HTML file, however im having trouble accessing the System.Web.UI namespace.

Adding System.Web to my references places a warning icon on top of the reference name in the solution explorer and System.Web is not available in the .NET reference list (in order for me to actually add it to the project I have to go to the object browser and add it from there).

Anybody have any ideas about what I could be missing?

Thanks alot people!

Upvotes: 11

Views: 5189

Answers (1)

John Sheehan
John Sheehan

Reputation: 78152

In Visual Studio 2010 the default target framework for Console Applications is ".NET Framework 4 - Client Profile" which doesn't include System.Web. Change it in the project properties to just '.NET Framework 4' and you can add the reference.

Upvotes: 16

Related Questions