I have a .NET 4 application that is going to be deployed on a bunch of computers that have .NET 3.5.
Are there any guides or resources on how to distribute .NET 4 (or .NET 4 Client Profile) with my application so that it “just works” when the user installs it?
Environment Notes:
- This will be installed on computers internally on a LAN
- I’m using a VS2010 Setup project to install my application
It all depends on your method of deployment.
If you’re creating your own setup executable, you could simply have it check for the presence of .Net 4. If it doesn’t find it – have it launch the .Net 4 redistributable installer from a shared network location, or use the web installer.
If you’re not using your own setup executable, you could use something like InnoSetup. There are a few scripts around online to check for / install a specific .Net version before installing your program.
If you are installing it local to your network – you could use the ClickOnce deployment method. It has options built in to install the necessary framework.
As a caution – if it is a local network installation and you have a restrictive firewall, it might not be able to get to the outside and download the installer. For this reason, as well as to save bandwidth, I would recommend you download the redistributable installer and locate it somewhere everyone can access.
Some google hits also turned up a method referred to as the “bootstrapper” – but I couldn’t find any recent resources for this.