Visual Studio 2012 Windows service .vdproj project migration

て烟熏妆下的殇ゞ 提交于 2019-12-02 16:38:24
Andrew Walters

This will probably be long and boring because there's lots of steps, but I'd like to write up how to move from a Windows service installer .vdproj to the new InstallShield LE that's available in Visual Studio 2012.

Step 1: Create a merge module (.msm)

Follow the steps of this guide.

Notes:

  • You will need to install WiX 3.6 and isWiX
  • The latest release of IsWiX doesn't enable the Tools menu item in Visual Studio 2012. Edit the file: C:\ProgramData\Microsoft\MSEnvShared\AddIns\IsWiXAddin.Addin (XML) and clone the HostApplication element and update 10.0 to 11.0.
  • In step #8 of the guide, it references a code tab. This has been moved to the XML Editor item in the bottom of the left menu
  • I left the MergeRedirectFolder empty for my installation

Here is my isWix files view:

After you're done with the guide you should have an empty .wxs file that looks something like this:

Using the Component XML element pulled from here you should end up with a .wxs file that looks like this:

Hit build and you should now have a .msm file.

Step 2: Adding merge module to InstallShield

  1. Go though the wizard to setup the basic install information like company and version information.
  2. Find the redistributables view in ISLE. Right click the list and select browse for module. After your module is found and added, right click the modules and select properties. Set the destination folder drop down to INSTALLDIR. I had to set mine to the lowest level folder I created for my install path, so you might have to experiment a bit.
  3. Build Project, and test on virtual machine

Redistributables Screen

If you're getting errors about the path being too long you might need to change the release location to something close to the root.

Here's a list of all the build errors for reference.

Now you should be able to run your installer and have it install/start a Windows service. A lot more work than .MSI files, we got it to generate in Visual Studio 2010, but overall it was not too bad.

Owen

While there is no easy or truly supported solution for Visual Studio 2012, Visual Studio 2013 users can get an extension from Microsoft in the Visual Studio Gallery.

I found this post which says you must download InstallShield first. It's a very confusing way to work. I suggest to vote up the post on the connect site and give them comments letting know how poor that is. They could at least give a more descriptive error http://connect.microsoft.com/VisualStudio/feedback/details/732196/project-creation-failed-for-installshield-limited-edition#tabs

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!