System.Web missing from "Add Reference" dialog in Console Application/ WPF Application projects - by LZandman

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 519390 Comments
Status Closed Workarounds
Type Bug Repros 1
Opened 12/9/2009 3:59:25 PM
Access Restriction Public


When I create a new Windows Console Application or WPF Application project and open the "Add Reference" dialog the "System.Web" assembly is missing. So it looks like it isn't possible to easily add a reference to this assembly in a Windows Console Application or WPF Application project.
Sign in to post a comment.
Posted by LZandman on 12/17/2009 at 7:58 AM
An hour to install? The framework install much faster than that. Besides, I personally consider the .NET Framework to be part of the operating system and a required install.

But OK, I understand this is a decision that was made long ago and was already implemented in a final product (.NET 3.5). So most probably this won't be reverted by my remarks during this beta stage. I guess this item can be closed...
Posted by David A Nelson on 12/16/2009 at 11:45 AM
You don't need System.Web to connect to the internet. System.Net (or System.ServiceModel for WCF services) is sufficient for most client-based applications.

Many ISVs have been complaining for a long time about the size of the .NET download and the time it takes to install. If you are trying to distribute a small single-form application to your clients, how do you explain to them that it takes an hour to install because of a Microsoft component? The client framework mitigates that issue (although it does not solve it completely).
Posted by Microsoft on 12/16/2009 at 10:55 AM
This work was actually done in the .NET 3.5 SP1 timeframe and here is a blog post on why and how:
Posted by LZandman on 12/15/2009 at 11:39 PM
Personally I'm not so sure if this split up of the .NET Framework is such a good idea. Now we have yet another thing to worry about during deployment. And it's needlessly complicated for end-users. Now they not only have to decide which version of the Framework to install, but also which sub-version (the client or full SKU).

What's the reasoning behind this split up? .NET Framework installer size? There can't be that much difference between the client and server SKU, can it?

And also nowadays almost all software connects to the internet. So, even if there's some justification to remove server stuff from the client SKU, I don't see why System.Web is considered to be a server component.
Posted by Microsoft on 12/15/2009 at 3:50 PM
In .NET 4 the framework was broken into two SKU's the client SKU which does not contain any server pieces and the server SKU which contains server code. By default the console application is set to the client sku which is why you can't add the system.web. Select properties on your project, change the framework to .NET 4 Server and then you will be able to add the system.web reference.
Posted by David A Nelson on 12/10/2009 at 12:31 PM
Targeting the client profile theoretically makes the application easier to deploy. If you install such an application on a machine that doesn't have the .NET Framework, it only has to install the client profile, not the whole framework. If the machine already has the client profile, you don't have to install anything.

Since (theoretically) most desktop applications don't need the System.Web assembly (and other non-client profile assemblies), targeting the client framework by default results in an easier installation.
Posted by Microsoft on 12/10/2009 at 3:24 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(
Posted by LZandman on 12/9/2009 at 4:15 PM Yes. At first I didn't know what you meant with "client profile". But then I checked the Project Properties and noticed the Target Framework was indeed set to ".NET Framework 4 Client Profile". When I set it to ".NET Framework 4" the "Add Reference" dialog showed the System.Web assembly again. Thanks for the solution.

However, why was the Target set to ".NET Framework 4 Client Profile" by default?
Posted by David A Nelson on 12/9/2009 at 4:06 PM
Are you targeting the client profile?