How to Enable WiX Projects in Visual Studio 2017
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:
Close all instances of Visual Studio.
-
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.)
You may need to provide Administrator permission:
The result will look like this:
Copy
C:\Program Files (x86)\MSBuild\Microsoft\WiX
toC:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\WiX
-
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.)
When you open Visual Studio 2017, WiX 3.10 and earlier projects will be compatible.
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:
- Close Visual Studio 2017
- Install the WiX Toolset Build Tools
- Install the WiX Toolset Visual Studio 2017 Extension
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".
Comments
-
Chris Schiffhauer almost 2 years
In Visual Studio 2017's New Project dialog, there is no entry for Windows Installer XML (WiX).
Is it possible to enable WiX projects in Visual Studio 2017?
-
Sean Hall about 8 yearsIt'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 over 7 yearsAnd 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ó over 7 yearsI 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 over 7 yearsWhile 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 over 7 yearsI tried this as well as @Basim's answer. Does not work in 2017 RC, 15.0.26014.0?!
-
Chris Schiffhauer over 7 years@l33t Does anything happen at all?
-
l33t over 7 yearsNo. 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 over 7 years@l33t What versions do you have installed?
-
l33t over 7 yearsOnly
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 over 7 years@l33t Where did you copy files from in Step 2?
-
l33t over 7 yearsI did exactly as described in the answer. Same paths.
-
codenamezero over 7 yearsDoesn'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 over 7 yearsI 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 about 7 yearsI 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 about 7 yearsAlso, 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 almost 7 yearsThis helped me. I checked and copied the WiX folder from 12.0 (since I was using VS2013 at first).
-
Andreas over 4 yearsThis 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 over 2 yearsVS 2022 provides for the Wix Toolset extension.