R – .NET setup projects using Visual Studio 2008

deploymentinstallationnetwindows-installer

When you create a Setup project for a Windows/Console application, you find that there are two outputs.

  1. Setup.exe
  2. .msi

What does setup.exe and .MSI do? Which one should be used for installation?

I have seen that I can install the application using both. But Setup.exe is fairly small file compared to the .MSI file.

Questions

  1. If I have to ship to the client. I cannot send two files. What's the best approach to merge these two files into one Setup file?

  2. I have read that Setup.exe is a bootstrapper which checks the .NET framework and then calls the .MSI file. Is it correct?

  3. I couldn't test for the unavailability of .NET framework because I'm a .NET developer and also my team works on .NET and have .NET installed. I didn't want to risk the Visual Studio by uninstalling the .NET framework and testing the setup application.

How does it install .NET framework? It is 200 MB odd, but my setup is less than 3 MB.

Does it give a option to download or something?

Any help appreciated.

Thanks,

Best Answer

The MSI is the installer for you application. The setup file is a bootstrap that will check for pre-reqs. Like correct version of the windows installer. I think it is also the setup.exe that will allow download of the right version of the .NET framework. You can use the .MSI on its own, you can't use just the setup.exe.

You are correct that the setup allows the download of the correct version of .NET framework.

There are ways to merge the MSI and the Setup.exe to create a single exe. Things like a self-extracting zip or iexpress.

Why can't you send them both files though? I think if you publish the setup and msi on a server for download the setup will find and download your MSI when it is required.