Author Topic: WiX for Visio Add-ins and Content  (Read 6057 times)

0 Members and 1 Guest are viewing this topic.

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
WiX for Visio Add-ins and Content
« on: March 11, 2015, 08:43:42 AM »
Hi All,

Nikolay has paved the way for creating a WiX based add-in installer for Visio.

This is great, since Microsoft abandoned the MSI installer project in Visual Studio, and doesn't seem to have left many alternatives for installing VSTO add-ins. Yes, there is ClickOnce, which works quite well, but it can be confusing to customers--it's difficult to send them install bits directly, and setting up a ClickOnce server is complicated (so I've heard.)

Nikolay has published his WiX Setup Project for Visio on CodePlex, which gets you started. Using this template, you can immediately create a package that installs stencils and templates in a "published" way that shows nicely in Visio's UI. And there's more information about the Visual Studio template on his own site, Unmanaged Visio.

He's even created a few videos to get you started:
He's even taken it further with his Visio Publishing Tool - Online Concept -- check it out!

But I still have a few questions when it comes to publishing a full solution using WiX.

  • What do you do with all the other files?
    In addition to stencils and templates, there is the add-in dll itself, many supporting dlls, a bunch of pdb files, and potentially other files like xml configuration/mapping files, and help documentation.
  • How do you link the output of a solution to the input of the WiX files?
    I'm working in one solution, and maintaining the stencils and templates within that solution. Do I have to copy them over to the WiX project and rebuild?

Chris Hopkins addressed part of question #1 in this article: WiX for Visio add-ons and content deployment. In this article, he explains; "If you are using VSTO you will also need to add registry entries for the manifest and load behavior. This is simple using the Registry keys as..." and a bunch of XML follows.

I imagine that adding the supporting files is similar to the method that Chris H. outlines. But I'm not sure. And the question about sharing the output files between projects remains.

Does anyone have more in-depth experience tying this all together?
« Last Edit: March 11, 2015, 08:48:33 AM by Visio Guy »
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Nikolay

  • Hero Member
  • *****
  • Posts: 958
    • UnmanagedVisio
Re: WiX for Visio Add-ins and Content
« Reply #1 on: March 11, 2015, 09:22:25 AM »
Hi Chris,

These are damn good questions :)

1. The setup project does not include add-in. It probably would make perfect sense to just combine everything -
so that one can have Addin + Templates + Stencils + all other files all in one solution.. Would make perfect sense, and is relatively easy to add.
I.e. you start new project -> then select what you want in that project, like "Addin -> COM/VSTO/None, Templates -> Yes/No, Stencils -> Yes/No, Other files (like readme or PDFs) -> Yes/No..

You can do like that by hand now, but it does not come out of the box, although it's not complicated actually.
In principle you can just add files just like this (in the Product.wxs):
<File Name="your PDF file" />

I'll try to post a normal example of XML when I get home - basically all you need is just to change the WiX xml :)

2. To link output of one project as input for WIX, you can just reference a project output files (Add reference -> Project output).
Does not play well for VSTO type project though (shows an exclamation mark, because M$ decided that VSTO does not need installers, so VSTO projects can't be referenced) but it actually works de-facto if you just ignore that exclamation mark.

Here I found some screenshots: http://www.kentie.net/article/wixtipstricks/

About the VSTO.. I would not do an MSI-installer for VSTO-add-in.. Why? It supports already publishing out-of-the-box. Automatic update/publishing will be lost for example..
Note that you can include additional files when you simply publish a VSTO-project.

BTW, There is now also a second coming of the .vdproj - also as an extension.
It does not seem to play that well with Visio Solution publishing tool though (AFAIR the solution publishing tool expects some tables which are not there - if you add those by hand, it works).
« Last Edit: March 11, 2015, 09:26:13 AM by Nikolay »

Nikolay

  • Hero Member
  • *****
  • Posts: 958
    • UnmanagedVisio
Re: WiX for Visio Add-ins and Content
« Reply #2 on: March 11, 2015, 07:30:09 PM »
Video where I tried to suggest how it all can be combined:
https://www.youtube.com/watch?v=GtbXMOws5CA&hd=1

The sample (combined) project attached.
Note that Video is for a Shared COM Add-In (not VSTO)

Nikolay

  • Hero Member
  • *****
  • Posts: 958
    • UnmanagedVisio
Re: WiX for Visio Add-ins and Content
« Reply #3 on: March 13, 2015, 12:22:56 PM »
Ups, the video was marked as private  ???
Fixed

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1718
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: WiX for Visio Add-ins and Content
« Reply #4 on: March 17, 2015, 05:35:54 AM »
Thanks for the video. That shows how to move all the xml bits around.

Best part of the video, Nikolay's Task Bar  ;D ;D

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Nikolay

  • Hero Member
  • *****
  • Posts: 958
    • UnmanagedVisio
Re: WiX for Visio Add-ins and Content
« Reply #5 on: January 15, 2016, 04:08:28 PM »
Updated to version 1.0.4 to support Visio 2016 and VS 2015
See http://visguy.com/vgforum/index.php?topic=6080.msg29198;topicseen#msg29198
« Last Edit: January 16, 2016, 02:30:12 PM by Nikolay »