How to Enable WiX Projects in Visual Studio 2017

48,093

Solution 1

WiX v3.11.0.1507 provides full support for the VS 2017 Extension For WiX. The Release Notes provide insight into why it has taken so long to provide the extension and compatibility with the extension and older versions of WiX

Note: You can use the "WiX Toolset Visual Studio 2017 Extension" with previous versions of the WiX Toolset but there is a forwards compatibility issue when building managed custom actions that is only fixed in the WiX v3.11 RC release. In other words, if you have managed custom actions and you want to use VS 2017 then you must upgrade to WiX v3.11 RC.

Edit: The VS 2019 Extension is now available.

Edit: The VS 2022 Extension is now available.

The Wix Releases Page has links to the other extensions.

Solution 2

You can manually enable Visual Studio 2017 compatibility with WiX 3.10 or earlier:

  1. Close all instances of Visual Studio.

  2. Copy
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX to
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\WiX

    (In the destination path, replace "Enterprise" with "Professional" or "Community" depending on your edition.)

    enter image description here

    You may need to provide Administrator permission:

    enter image description here

    The result will look like this:

    enter image description here

  3. Copy C:\Program Files (x86)\MSBuild\Microsoft\WiX to C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WiX

  4. Then execute the following command as Administrator:

    "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv" /setup

    (Again, replace "Enterprise" with "Professional" or "Community" depending on your edition.)

    enter image description here

When you open Visual Studio 2017, WiX 3.10 and earlier projects will be compatible.

enter image description here

Solution 3

I found that I also had to copy the WiX folder from "C:\Program Files (x86)\MSBuild\Microsoft" "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft". Without this, I got an error trying to load my WiX project that one of the MSBuild targets files couldn't be found.

Solution 4

WiX now offers support for Visual Studio 2017.

All you have to do is:

Solution 5

The answer by Chris works, but on my machine, for some reason, the Wix folder in "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\WiX" had only one template named "CustomActionCPP.zip". I had to search for a complete Wix folder in other older versions of Visual Studio. It worked for me by copying Wix from "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft\WiX\ProjectTemplates".

Also, had to apply the answer by Basim, by copying Wix from "C:\Program Files (x86)\MSBuild\Microsoft" to "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\Microsoft".

Share:
48,093
Chris Schiffhauer
Author by

Chris Schiffhauer

May contain giblets

Updated on July 08, 2022

Comments

  • Chris Schiffhauer
    Chris Schiffhauer almost 2 years

    In Visual Studio 2017's New Project dialog, there is no entry for Windows Installer XML (WiX).

    enter image description here

    Is it possible to enable WiX projects in Visual Studio 2017?

  • Sean Hall
    Sean Hall about 8 years
    It's worth noting that this is unsupported (and requires copying the WiX extensions folder from VS2010 or later). VS doesn't currently support building an extension that automatically supports future versions, so every VS extension has to explicitly provide support for new VS versions. WiX doesn't normally add support for a new VS version until after the Preview stage.
  • lordjeb
    lordjeb over 7 years
    And it's now worth noting (as of today) that VS2017 is at the RC stage. The above will still work, but the path is "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\..." (if you have the Professional edition installed.
  • Eugenio Miró
    Eugenio Miró over 7 years
    I just installed Enterprise and made the same process but used C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\WiX instead and worked like a charm
  • Basim
    Basim over 7 years
    While the above worked, I also started running into issues with Visual Studio remaining with high CPU usage when idle and I found that when I disabled the WiX extension, the high CPU usage stopped.
  • l33t
    l33t over 7 years
    I tried this as well as @Basim's answer. Does not work in 2017 RC, 15.0.26014.0?!
  • Chris Schiffhauer
    Chris Schiffhauer over 7 years
    @l33t Does anything happen at all?
  • l33t
    l33t over 7 years
    No. I can't see the project type when I try creating a new project, and existing projects fail to load. I see two zip files in this WiX folder. That should be enough? Also, note that I don't have VS 2015 installed.
  • Chris Schiffhauer
    Chris Schiffhauer over 7 years
    @l33t What versions do you have installed?
  • l33t
    l33t over 7 years
    Only 2017 RC (just updated to 15.0.26020.0) + Wix 3.10.3. Do I need some special packages (like "Extensibility") to get this extension to pop up? Shouldn't be needed afaik.
  • Chris Schiffhauer
    Chris Schiffhauer over 7 years
    @l33t Where did you copy files from in Step 2?
  • l33t
    l33t over 7 years
    I did exactly as described in the answer. Same paths.
  • codenamezero
    codenamezero over 7 years
    Doesn't work. devenv /setup Microsoft Visual Studio 2017 RC Version 15.0.26020.0. Copyright (C) Microsoft Corp. All rights reserved. The license for Visual Studio expires in 140 days. The operation could not be completed
  • Harry
    Harry over 7 years
    I don't have Visual Studio 2015 installed. So I see WiX din't install the extension. How to get the extension without installing VS 2015?
  • Patrick
    Patrick about 7 years
    I had installed ONLY VS2017 and had to copy from another machine where VS2015 was installed the mentionen folder. The same for the folder of @Basim mentioned.
  • Rob Mensching
    Rob Mensching about 7 years
    Also, note that if you followed any of the suggestions in the other answers in this question that the new Wix Toolset Visual Studio 2017 Extension may fail to install or generally not work correctly. If so, clean up what you did by hand then install using the official release.
  • Rafael
    Rafael almost 7 years
    This helped me. I checked and copied the WiX folder from 12.0 (since I was using VS2013 at first).
  • Andreas
    Andreas over 4 years
    This solution works in docker when VSIXInstaller.exe just crashes violently (undefined error code) trying to install the Votive.vsix. I guess sometimes reverse engineering is the only way forward...
  • Roland
    Roland over 2 years
    VS 2022 provides for the Wix Toolset extension.