Reputation: 2593
I would like to avoid redistributing .NET runtime if possible with my application since it will increase the size of the application, download time, development time & will possibly introduce many different deployment errors. Does Microsoft force users to update .NET runtime via Windows update? If not, what are some of the options to redistributing .NET runtime? Has Microsoft made it any easier to re-dstribute runtime with .NET appliactions? Also, is .NET runtime gauranteed to be backward compatible?
I am just summarizing the answers here. Looks like we have to have a bootstrapper to at the least check for the existence of the .NET run time. The alternative option is to package the runtime and deploy it if it does not exist. There are multiple options for packaging & Visual studio does provide an option to build installer project with the runtime. There are also other packaging options like InnoSetup, WIX etc (not sure which option is better and free). Runtime installation requires a reboot and the chosen installation option should resume application installation post reboot.
Upvotes: 1
Views: 1423
Reputation: 22406
Using a bootstrapper of some sort, you can check if .NET is installed and then download it if necessary.
For example, with the MSI Factory bootstrapper (I'm not advocating MSI Factory, it's an ugly program. But the bootstrapper it comes with is alone well worth the license cost if you're developing commercial software like we do) there's scripts you can simply include to perform this function. We're using WiX + the MSI Factory bootstrapper to distribute both a single compressed EXE (30Mb), and a small 1Mb "downloader" EXE that downloads an MSI. Both EXE's check for the presence of .NET 2.0 and then download it if necessary. We also distribute a standalone MSI which also checks for .NET and blocks installation if it's not present.
Basically you've got the following:
Ignore .NET 1.1, just ignore it. Vista users and beyond will only have it installed for legacy application support, or if they're a developer.
.NET 2.0 is the most commonly installed version, from our user base we've found that less than 10% of users have .NET 3.5 installed. If your application is targeting a technical, geeky audience then I'd say that ~50% of people will have .NET 3.0. If you're targeting a consumer/retail/non-tech market, you can probably estimate around 30% with .NET 2.0 and 10% with .NET 3.0 or above.
The above figures are based on browser traffic to our websites, a mostly non-technical audience. This is probably the best way to get an idea for your market. IE always reports the .NET version in the User-agent string so break out the weblogs and start analyzing :)
Upvotes: 1
Reputation: 2796
Just make a Windows Installer project. You should have this as an option in VS2005 and VS2008. It will make sure when installing you application that the system has the .NET runtime and any other required software for that matter. This will add it to your installer package, not your application. This is usually how you install your applications or you use Install Shield.
alt text http://img154.imageshack.us/img154/2066/newprojectr.png
Upvotes: 3
Reputation: 11637
It depends. Where I work, we include it in the installer as a prerequisite because we have some customers who may not have an internet connection to download the runtime.
A few things you can do:
If I knew my customers were all online, I'd do option 3 for .NET as well as any other prerequisites like Crystal Reports or SQL Express. I have installs where I have that included and the install is over 100MB. 70MB+ is prerequisites.
Upvotes: 0
Reputation: 18815
When you create your installer package, it will only install the runtime if it is required. i.e. not already on the system (or wrong version)
Edit: Yes you should create this package, it makes your life a lot easier for this exact thing. The way that you would do this in VS is File->Project and select intstaller project. The wizard will guide you through the options.
Upvotes: 1
Reputation: 9084
Also, you should worry about that. Without the runtime your application will mysteriously not work. You should never assume that some particular version of the runtime is pre-installed.
As noted above, the installer project wizard in VS will create a setup file that only downloads it if needed. NSIS and Inno Setup have scripts that will do the same thing. Note that you will need to handle reboot-and-continue-setup when you install the runtime. I believe the installer wizard handles this for you.
Upvotes: 2