[.net] How to deploy .NET framework & your app in ONE .MSI setup file?

Started by
10 comments, last by realgames 14 years, 8 months ago
I have a .NET 2.0 application, and I want to have one setup (preferably a .MSI file) that the user can download from my web page and install. Visual Studio 2008 creates a Setup Project for me that makes a .MSI installer, but when I try to run it on a fresh copy of Windows XP with SP2, it complains that the .NET framework is not installed. I've read that deploying .NET is as simply as including a .NET .exe setup file with your application. The problem is I am trying to keep the setup program in one file that the user can download. Is there an elegant way to have my .MSI file download .NET 2.0 from Microsoft.com and install it if it's not already installed?
Advertisement
If they're using MSI, and I suspect they are, then no. MSIs can't run at the same time, so a bootstrap EXE of some type is required, and if you're keeping count we're up to three files. I have two solutions, which are essentially pretty similar:
1) Make a self-extracting ZIP file via WinRAR that does everything in the user's temp folder (SlimDX SDK continues to be shipped this way.)
2) Use an InnoSetup installer as the parent bootstrapper, and let it integrate the dependent files into itself.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by Promit
If they're using MSI, and I suspect they are, then no. MSIs can't run at the same time, so a bootstrap EXE of some type is required, and if you're keeping count we're up to three files. I have two solutions, which are essentially pretty similar:
1) Make a self-extracting ZIP file via WinRAR that does everything in the user's temp folder (SlimDX SDK continues to be shipped this way.)
2) Use an InnoSetup installer as the parent bootstrapper, and let it integrate the dependent files into itself.


I know that installing multiple MSIs at the same time is not supported, but a bootstrapping EXE would require multiple files to be present. I've considered distributing the program as a .zip file, but your self extracting option seems good... I'll try it. I would use Nullsoft Install System (NSIS) or InnoSetup as a last resort for a bootstrapper.

I'll try the self extractor!
A bootstrapping exe would usually contain the individual MSI files as embedded resources. It could then simply extract the MSIs and run them one by one (as needed).

That's basically how self-extracting ZIP files work anyway.
Quote:Original post by Codeka
A bootstrapping exe would usually contain the individual MSI files as embedded resources. It could then simply extract the MSIs and run them one by one (as needed).

That's basically how self-extracting ZIP files work anyway.


Wrong.

The bootstrapper that Visual Studio generates for me is one setup.exe file and several other setup .msi files along side that it runs in sequence. The problem is that it doesn't embed them into the main setup.. and I need everything to be installed from one exe... .net, all of the dependencies.

Quote:Original post by andreib
Wrong.

The bootstrapper that Visual Studio generates for me is one setup.exe file and several other setup .msi files along side that it runs in sequence. The problem is that it doesn't embed them into the main setup.. and I need everything to be installed from one exe... .net, all of the dependencies.
Er, I didn't say "the bootstrapper that Visual Studio generates", I said a bootstrapping executable. You can create one yourself that does whatever you like.
Quote:Original post by andreib
Quote:Original post by Codeka
A bootstrapping exe would usually contain the individual MSI files as embedded resources. It could then simply extract the MSIs and run them one by one (as needed).

That's basically how self-extracting ZIP files work anyway.


Wrong.

The bootstrapper that Visual Studio generates for me is one setup.exe file and several other setup .msi files along side that it runs in sequence. The problem is that it doesn't embed them into the main setup.. and I need everything to be installed from one exe... .net, all of the dependencies.

So you put it all in a self-extracting zip, or even a regular zip. Most extractors will run the setup.exe once it's done extracting.

Former Microsoft XNA and Xbox MVP | Check out my blog for random ramblings on game development

The setup wizard has an option to include the .net install with the delivery.

But, the easiest way is to employ Click once web page and it will install the .net if needed. Or at least we have it setup that way. There's an option in the publish I believe, if not use the setup wizard project and you can check the checkbox for it.
yeah, check out clickonce for the most simple deployment method (and auto-update/patch management..).

love it. other than that, you could create your setup exe + msi files, and take f.e. winrar to create a solid archive at highest compression (just for the fun), that runs setup.exe when opening.. done this before, works great.

not the fine way, but it works :)


now i only use clickonce for deployment. on the web, on local servers, even on disks/usb sticks, if needed. awesome it is.
If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Yes, ClickOnce will manage certain dependencies like .NET framework and SQL Server Compact Edition.

[Formerly "capn_midnight". See some of my projects. Find me on twitter tumblr G+ Github.]

This topic is closed to new replies.

Advertisement