4

My application (unfortunately) requires the full 4.0 .NET framework. It appears there is no way through the Visual Studio setup and deploy projects to create and post a single file that ensures end users will download and install the full .NET version. The MSI will mislead users into downloading the client version and put the user into an endless cycle of "This setup requires .NET framework version 4 ... The .NET framework can be obtained from the web. Would you like to do this now?"

Alternatively, running setup.exe will do what I need (that is, ensure .NET 4.0 full installs from the web), but imposing two files on a user to install my software is unacceptable to me (and anyone trying to keep things simple for skittish customers).

So is the .NET MSI installer useless for applications that require the full version?

(Oh and another piece of joy from Microsoft: Microsoft has sworn their staff to secrecy as to what version results from the .NET 4.0 Web installer. I only know from experience it's the client version).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Chris
  • 314
  • 2
  • 8
  • Actually, [MSDN clearly states what profiles are installed for each version](http://msdn.microsoft.com/en-us/library/5a4x27ek.aspx), including that the [dotNetFx40_Full_setup.exe installer](http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9cfb2d51-5ff4-4491-b0e5-b386f32c0992&displaylang=en) (note the name) installs the Full Profile. Are you sure you verified your versions correctly? – Greg Jackson Jun 23 '11 at 23:42
  • Well, I'm clear on what the differences are between Full and Client. But if you go to the web installer page in your link, no where does it say what version you're getting. I thought it was a full version and so I put that on my website with my software but as it turns out, it only installs the minimum (i.e. client). – Chris Jun 24 '11 at 01:46
  • And why bother with this Client/Full version? If a user can download 28 MBs, a user can download 41mb. Let's just have one version and a lot less confusion. (although I love that the same .net 4 installer works for Vista/7/Xp Sp3 32 bit and 64 bit). – Chris Jun 24 '11 at 01:47
  • [Sorry, was in a snippy mood earlier, let's try this again.] The version is in the file name, and very clearly documented on MSDN. It might be slightly unclear if you're unfamiliar with the profiles, but that's a long way from intentionally obscuring it. There's a lot more than download size involved. Install time and size are also affected, which could be significant on certain kinds of lightweight systems. I'm sure there's a lot of thought involved in these decisions that you might not be aware of. Please simply ask what you need to ask and take your rants elsewhere (I suggest a blog). – Greg Jackson Jun 24 '11 at 08:19

2 Answers2

2

The problem is caused by "Launch Conditions"...when you do "Add Launch Condition" it doesn't bother to detect the framework "profile" being used by your Project/"Primary Output"....and always defaults to a condition that points to ".NET Framework 4 Client Profile" and InstallURL = http://go.microsoft.com/fwlink/?LinkId=131000.

So when you need your Setup to have a dependency on the ".NET Framework 4 Full Profile" change the Version property to ".NET Framework 4" and make sure you manually update the InstallUrl to http://go.microsoft.com/fwlink/?LinkId=186913, because it fails to change the Url when it should.

This will then take them to the web page with the "Web Installer" for the "Full Profile" .NET 4 Framework, rather than the "Client Profile" one.

You could alternatively set InstallURL to http://go.microsoft.com/fwlink/?LinkID=186916 for the "Full .NET 4 Standalone/Offline Installer".

It's also worth changing the Prerequisites in your Setup project.

enter image description here enter image description here

Colin Smith
  • 12,375
  • 4
  • 39
  • 47
1

Try changing the "Launch Conditions" of the MSI in the project settings:

Enter image description here

When I did that, I was directed to .NET Framework on the Visual Studio area on MSDN which has a link to the .NET 4 web installer (dotNetFx40_Full_setup.exe).

A more involved solution would be to ship dotNetFx40_Full_setup.exe with your MSI file and detect the framework version yourself during the install process and run the setup.exe if required; you would then continue with your install when the framework is installed.

Colin Smith
  • 12,375
  • 4
  • 39
  • 47
wal
  • 17,409
  • 8
  • 74
  • 109
  • 1
    Yes, the launch conditions are fine. It's strange but the MSI installer is smart enough to know (via the launch conditions) that the user needs the full .Net 4 AND that the user needs to install the full version. BUT the MSI installer oddly breaks down by sendin the user to a web page where they download and install the client version. The user thinks they're doing things correctly but gets put into an endless loop of installing the client version and being told they need the full version. – Chris Jun 24 '11 at 01:44
  • ok, what URL does it take them to? i went to the above URL and downloaded the framework and it was the full .NET (tested on a clean VM) – wal Jun 24 '11 at 02:54
  • and can i suggest trying the install process on a different machine, just for testing sake – wal Jun 24 '11 at 02:55
  • Here is the link that discusses exactly how to modify the launch configurations: http://syncor.blogspot.com/2012/10/when-vs-setup-wizard-doesn-get-net.html – ecoe Oct 13 '14 at 15:35