3
votes

Last spring we forced our installer to require .NET 3.5 to resolve some compatibility issues. Now .NET 4.0 is out. My understanding is that if a user installs 4.0, they do not necessarily also install 3.5.

Although we instruct the users to install 3.5 in our warning message, the default selection on the .NET download page is 4.0. So, when a user installs our software, they are instructed to get 3.5, they accidentally download 4.0, and the app complains.

The simple solution would be to have the installer require 4.0 since it is backwards compatible, however, we're still using VS 2008; when I edit requirements, the list of .NET version only goes up to 3.5.

Is there a way to have the installer require 4.0?

It seems a shame to upgrade to VS 2010 solely to change two characters of text in a config file.

NOTE: I am not trying to target .NET 4.0 in my code, just ensure that it is the installed version.

2
Stop displaying warning messages to the user and just take care of it in your installer. The bootstrapper for .NET 3.5 SP1 is quite small. Only install what you can test and support. - Hans Passant
The bootstrapper doesn't seem the way to go to me. Why should the user have to install 3.5 SP1 if they've already got the backwards compatible .NET 4 installed ? Editing app.config to let the app run on either is surely better. - Michael Low

2 Answers

3
votes

I think it would be easier to add the following in your app.config instead, which should ensure that your app runs whether the user installs 3.5 or 4 and stop your app complaining.

<startup>
  <supportedRuntime version="v4.0" sku="Client" />
  <supportedRuntime version="v2.0.50727" sku="Client"/>
</startup>
1
votes