Reputation: 21
How to Create a MSI for windows Applications which is available in different visual studio solution.
Upvotes: 1
Views: 1159
Reputation: 27001
If you have installed the installer extension (if not, see notes below), open Visual Studio, then do the following (at this point, no solution is opened):
If you start with a new solution, select File -> New Project.
(In case you want to add the installer project to an existing solution instead, right click on
the solution in the solution explorer and choose from the context menu Add -> New
Project.)
In the New Project dialog, select "Other Project Types", then "Visual Studio Installer" and there "Setup Wizard" (Alternatively you can also select a Windows setup project or a Web setup project directly - the wizard has the advantage that it will ask you about several items)
You have now a solution with one setup project. Now you can add an existing project (select the solution, right-click and select "Add existing project"). After you have done that, right-click on the setup project and select "Add -> Project Output". Now you can select the items to be included in your setup project.
If required, you can also add other assemblies via "Add -> Assembly..." or, if you have that, you can add merge modules.
Notes
x86
). Version is just a number (e.g. 1.0.1
) while the other two properties are GUIDs. If you change the version in the package properties, then Visual Studio asks to create a new ProductCode (if you answer the question with "Yes" - which is recommended). This allows the Windows installer to distinguish the differrent packages from one another and allows to upgrade a package, because the UpgradeCode isn't changed.false
- but in most cases you want to change this to true
(remember what I said before about ProductCode and UpgradeCode): To remove old versions automatically when you install a new version.Upvotes: 1