Prerequisites button disabled - MSI installer

2019-01-15 22:15发布

I have created an .msi installer. I want to further add prerequisites (such as .Net) but when I go to Setup Project properties, the Prerequisites button is disabled. How do I enable it?

Other details:

  • I'm using VS 2015, SQL Server 2008 R2, .Net 4.5.2, C#, WinForms, Win 10 Pro x64
  • My setup project is in the same solution as the main project

1条回答
来,给爷笑一个
2楼-- · 2019-01-15 23:17

Prerequisities in Visual Studio Projects

In Configuration at the top of the dialog, did you try to select either Release or Debug? That should enable the Prerequisites... button.

Visual Studio Projects Property Dialog


Unecessary, outdated prerequisites?

One pet-peeve of mine: is it really necessary to include the .NET runtime as a prerequisite when most users have it installed by their deployment team (corporations) or via Windows Update (home and small office users)?

If there are security updates for the runtime, your old, embedded runtime is just a nuisance to be honest. Corporate packagers spend a great deal of time removing runtimes and prerequisites for corporate deployment where all runtime components are packaged separately in the corporate standard format. Perhaps consider making a special corporate "large scale deployment" version of your setup bundle? Just a zip with components will be very appreciated, along with a one page PDF on how to deploy them.

For the .NET framework you could just add a launch condition to abort the installation if the runtime is not found, and tell the user to get the runtime via Windows Update or from their system administrator or deployment team.

Just a thought I wanted to share with you. Prerequisites can really bloat a setup - especially when they are almost never needed like the .NET framework. In the future we will certainly pull prerequisite packages straight from online repositories and not embed anything in our main setups (and probably struggle with new security issues from that approach).


WiX and other deployment technologies

Setup projects are rather limited. If you find yourself needing more features, you might want to check out the WiX toolkit.

Here is a previous answer on WiX and other deployment tools that seems to have been helpful for people: MSI vs nuget packages: which are is better for continuous delivery?

查看更多
登录 后发表回答