Condividi tramite


How to get IntelliSense for WiX in Visual Studio 2003 and 2005

There have been a couple people to blog about this already (one is here), but I wanted to point out that Visual Studio 2003 and Visual Studio 2005 are different in how you get IntelliSense working for WiX files. For both you have to copy the wix.xsd file to a specified directory.

Visual Studio 2003

Copy the wix.xsd and wixloc.xsd files to the following directory: C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml

Visual Studio 2005

Copy the wix.xsd and wixloc.xsd files to the following directory: C:\Program Files\Microsoft Visual Studio 8\Xml\Schemas

Now when you add <Wix xmlns="https://schemas.microsoft.com/wix/2003/01/wi"></Wix>, you should have IntelliSense. I don't recommend manually changing the registry key, as is mentioned in the other blogs, because the GUID is different for the XML editor between Visual Studio 2003 and 2005. You can achieve the same effect by opening a wxs, wxi, wxl, wixlib, or wixobj from within Visual Studio. Then on the Open dialog, click the drop down arrow on the Open button and select "Open With". It will then pop up a dialog with all of the various editors registered with Visual Studio. Select the XML Editor (HTML/XML Editor in Visual Studio 2003) and then click the "Set as Default" button. Now whenever you open a file with that extension Visual Studio will use the XML editor for it.

I'd also like to give a shameless plug for Votive, which is even easier. The votive.msi file available here will automatically copy the xsd files to the right places for you and will also give you WiX project support within Visual Studio: build support, editing, and many of the other nice Visual Studio stuff. It will also register all WiX file types under the XML editor, using the correct GUIDs. Note that Votive is still fairly young, so it does not have all of the features you'd expect. I'm always willing to have help, though, if you're interested in tackling some more features. [;)]

Comments

  • Anonymous
    July 07, 2006
    PingBack from http://www.revfry.com/2006/07/07/wix-intellisense-2k5/

  • Anonymous
    October 07, 2006
    If you&#39;re using WIX then you probably already know this but if you don&#39;t it won&#39;t hurt for

  • Anonymous
    September 02, 2007
    bill blaine teacherweb home page