I'm currently developing an application for .NET 4 Client Profile, as this is the version that will be present on most home computers through Windows Update.
However, I cannot add a reference to System.Web.dll
as it does not exist in this version - what should I do?
Is it a good idea to deploy System.Web.dll along with my application, or won't that work? I really need HTTP connections and all, so I cannot modify my application as a workaround. Is targeting my application to .NET 4 (no client profile) perhaps a possibility or will that just not work on computers with only the Client Profile?
NET 4 Client Profile, as this is the version that will be present on most home computers through Windows Update
Not really. .NET 4 (client profile or not) currently isn't present on any pre-Windows 10 installation by default. For example, Windows 7 comes with .NET 3.5 SP1, not .NET 4.0. There may be a windows update, but it is optional.
Therefore, you might as well target the full .NET 4 framework.
The link between operating systems and .NET framework versions can be found here. The checkmarks indicate that a version is available out of the box, plus sign means it can be installed.
Also note that 4.5, 4.6 and 4.6.1 are all in-place updates, meaning that a system with any of those is also considered to have 4.0.
If you are targeting .NET 4.0 and not .NET 4.0 Client Profile you should add that as a prerequisite. This will allow it to be installed when you install your application.
You can still use Sockets if you run .NET 4.0 Client Profile, they are located in System.Net
. You only want System.Web
when the following applies:
The System.Web namespace supplies classes and interfaces that enable browser-server communication. This namespace includes the HttpRequest class, which provides extensive information about the current HTTP request; the HttpResponse class, which manages HTTP output to the client; and the HttpServerUtility class, which provides access to server-side utilities and processes. System.Web also includes classes for cookie manipulation, file transfer, exception information, and output cache control.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With