Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert 100+ Visual Studio Installer Project (vdproj) to Wix Installers?

We have some 100+ Visual Studio C# / .net solutions, which contain an Visual Studio Installer Project (vdproj) for deployment. These are build in Visual Studio 2010.

In order to upgrade to Visual Studio 2012, we need to migrate these .vdproj projects to Wix, since vs2012 doesn't support these project types anymore.

These projects are mostly simple project, which install files to the given location. We do use a custom action during setup, to make .config files location specific (replacing tags with actual values).

What is the best way (with the least effort per project) to convert these projects to Wix?

like image 898
oɔɯǝɹ Avatar asked Nov 03 '22 12:11

oɔɯǝɹ


1 Answers

I will post my reaction here. Because of better formatting and some things I like to explain.

In your response of your comment. The answer also contains a script someone made using powershell. What you could do is create another powershell that will loop through your projects and then execute the script. But then you will only have the wxs-files, you still need to create 100+ wix projects and add the files to that project.

What you could also do is create post-build events at the project(s) you would like to install, using heat.exe. for example (might need some tweaking/change for your project)

call "C:\Program Files (x86)\WiX Toolset v3.6\bin\heat.exe" project "$(ProjectDir)$(ProjectFileName)" -directoryid INSTALLDIR -pog Content -gg -scom -sreg -sfrag -out "$(SolutionDir)Installed\$(ProjectName).Content.wxs"

Then you can link the output file to the WiX project so when ever you add files or dll it will get automaticly generated again and your files will stay in sync. All you need now is to create some sort of product.wxs template that you can use in all your wix projects.

I think the solution here would be to use a combination of PowerShell and heat.exe. You can use the above command to generate the wxs-file for your projects. But you will still have the manual labor of adding wix-projects.

like image 154
Rik van den Berg Avatar answered Nov 11 '22 05:11

Rik van den Berg