Creating a Setup with Visual Studio 2010 for an application that needs the full .net 4.0 framework

Tags: , , , , ,
Add comments

When using Visual Studio 2010 or any other version to create msi setups you can define prerequisites that need to be installed before the application will install. For most .NET applications this will be at least the .NET Framework itself. But from version 3.5 on there are two editions of this framework: the Client Profile and the Full Framework.

I created a setup and changed the prerequisites from Client Profile to the Full Framework. When testing this on a virgin machine the setup told me that I need to install the .NET 4.0 framework (that’s right) but then it directs me to the download of the Client Profile only.

To fix this, you have to change the InstallUrl of the .NET Framework Launch Condition:

  • right-click on the setup project in solution explorer and choose View –> Launch Conditions
  • here you will find a Launch Condition for the .NET Framework
  • select this Launch Condition and open the Properties Window
  • there you will find the InstallUrl property

For the full .net 4.0 Framework change this URL to http://go.microsoft.com/fwlink/?LinkId=186913

For the Client Profile of the .net 4.0 Framework the URL can stay as it is: http://go.microsoft.com/fwlink/?LinkId=131000

3 Responses to “Creating a Setup with Visual Studio 2010 for an application that needs the full .net 4.0 framework”

  1. Jim D Says:

    Thanks Benjamin!

  2. Genaro Garcia Says:

    I’ve been struggling on this issue for the passed to days. This was a great help. It resolved the issues I was having.

    A BIG THANKS, Benjamin…

  3. vm Says:

    Is there a way to remove the requirement altogether? I tried removing that requirement as well as changing it to an older version (2.0) and still get the error about needing the .net40 client. It doesn’t make sense to be able to set the version of .net needed in the references to an older version, but then requiring 4.0 to install it.

Leave a Reply

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in