Additional Setup in Visual Studio Installer Projects

Additional Setup in Visual Studio Installer Projects

Short Version: In essence you will need a deployment tool. List view of major deployment tools. Maybe that list view is the easiest overview? (a sense of scope). Much more detail below (and too many links too).


Details: There is some prerequisite functionality available in Microsoft Visual Studio 2017 Installer Projects, but I am unfamiliar with the details. I find this project type inadequate for real deployment work for a lot of reasons (lacking features and some odd implementations). More on this here - a few concrete problems to consider.

Several commercial tools will do this for you with special features to help make it quick(er). I verified that Advanced Installer can do it (and here is a great gateway to all things Advanced Installer. Some free features available). I assume Installshield can do it as well (certainly for other runtimes, didn't verify this particular one). Generally it will be handled by a setup.exe bootstrapper / chainer embedding all runtimes along with your own MSI file(s).

In other tools, you will have to do it yourself, by figuring out command lines and how to handle error conditions. There are some hints here (not tested by me - a google sweep will give you more): https://www.itninja.com/software/microsoft/access-runtime/2016-1

Get more command line info by going accessruntime_4288-1001_x64_en-us.exe /?:

command lines access 2016

WiX is free and open source - with a relatively hefty learning curve if you don't know MSI, and contains a bootstrapper feature called "Burn". Here is the documentation for: How To: Install the .NET Framework Using Burn (first read the "Building Installation Package Bundles" instructions in "Step 1"). A real-world Burn sample. And some sample source markup.

Some developers recommend the dotnetinstaller bootstrapper. Not something I know much about. It is just a bootstrapper. Runs things in sequence for you.

If you are doing in-house or ad-hoc deployment, even a batch file could do the job I suppose, but if you do that for a real product for large-scale and generalized deployment I would be very worried indeed. If there is one thing we hate as deployment specialists, I'd say it is batch files embedded in packages. Batch files (and scripts) are system administrator tools, not general deployment tools.


Some Older Links:

  • Executable files to MSI installer
  • How do Installation Software Programs Extract Files?
  • Create MSI or setup project with Visual Studio 2012
  • How to make an installer that automatically install all the prerequisite programs for the application
  • Windows service NOT shown in add remove programs under control panel
  • How to make an installer that automatically install all the prerequisite programs for the application
  • Wix - How to run/install application without UI

How to create an Upgrade installer with the Visual Studio Installer Projects extension

The answer was:

In addition to the changes you made (updating the AssemblyFileVersion and AssemblyVersion properties in the output assembly) you also need to update the version of the setup project.

  1. Select the setup project in solution explorer and hit F4 to bring up the properties
  2. Increase "Version"
  3. Say yes to the dialog that comes up asking if you want to update the Product Code
  4. Save and build the setup project again.

    This will enable the upgrade scenario.

And this does work. The reason I'm adding it here is that F4 is not listed on the .vdproj context menu so it's effectively undiscoverable.

There's one more quirk: if you're using Git, then for some reason it won't automatically check out the deployment project file, so you have to manually edit it (adding a space is enough) and reload the project, and then make the changes, which rewrites the project anyway.

Setup projects on Visual Studio 2022

For Visual Studio 2022 support for Visual Studio Installer Projects must now be installed as an official Microsoft extension from here:

https://marketplace.visualstudio.com/items?itemName=VisualStudioClient.MicrosoftVisualStudio2022InstallerProjects

I found this by googling "Visual Studio 2022 Installer Project".

Has anyone conquered the Visual Studio installer project in VS2019?

For all the people finding this in the future, here's the final word:

The build project can be inconsistent, this is well documented all over the internet as I have above. You're not doing anything wrong - it is just inconsistent.

Stop trying to solve it if it's affecting your project and move on (I've had a dozen projects before this one work just fine). The consensus seems to be to use WiX, but I'm not here to discuss the alternatives. Personally I am going to embark on the WiX learning curve though.



Related Topics



Leave a reply



Submit