I have improved the WiX project template by creating a real WiX compiler extension.
That is, now you can register Visio files with WiX like this (minimalistic example includes just one extra line to publish file):
<Component> <File Name="Stencil_1_M.vss"> <visio:Publish MenuPath="Group\Stencil 1" /> </File> </Component>
The updated version is available in Visual Studio Galery:
The magic is done by WiX compiler extension DLL, which handles this <visio:Publish> element. Writing a Compiler Extension is a task in itslef though, and can be explained later – unfortunatelly I haven't found much information about this. Maybe a brief introduction in building WiX Compiler Extensions could be useful.
Anyways, here is the full list of options you can use with <visio:Publish>:
<File Name="Stencil_1_M.vss"> <visio:Publish MenuPath="VisioSetupProject4\Stencil 1" Language="en-us" Visio2003="yes" Visio2007="yes" Visio2010="yes" Visio2013="yes" VisioEdition="x86" AltNames="stn1.vss;stencil1.vss" QuickShapeCount="2" /> </File>
Since the extension provides schema, autocomplete works in Visual Studio, so you don’t need to remember all options, you can just start typing. Each attribute and value is also provided with help message, so it shoudl be clear what it means:
The setup project was also modified to include a pre-built DLL to bump Visio id. It is not needed to do that explicitly in code anymore.
Also complicated conditional formatting related to x64 version of setup was removed, as it does not seem to be appropriate for a starter project.
So, that’s it for now. Comments / feedback are welcome =)