Visio Guy

Visio Discussions => Deployment => Topic started by: Visio Guy on March 11, 2015, 01:43:42 PM

Title: WiX for Visio Add-ins and Content
Post by: Visio Guy on March 11, 2015, 01:43:42 PM
Hi All,

Nikolay (http://visguy.com/vgforum/index.php?action=profile;u=380) has paved the way for creating a WiX based add-in installer for Visio (https://visualstudiogallery.msdn.microsoft.com/68d12e2d-eb42-4847-808a-7d80863bb90d?SRC=VSIDE).

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 (https://visualstudiogallery.msdn.microsoft.com/68d12e2d-eb42-4847-808a-7d80863bb90d?SRC=VSIDE) 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 (http://unmanagedvisio.com/products/visio-wix-installer-project-template/).

He's even created a few videos to get you started:
He's even taken it further with his Visio Publishing Tool - Online Concept (http://visguy.com/vgforum/index.php?topic=6286.msg25920#msg25920) -- check it out!

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


Chris Hopkins addressed part of question #1 in this article: WiX for Visio add-ons and content deployment (http://blogs.msdn.com/b/chhopkin/archive/2013/07/08/wix-for-visio-add-ons-and-content-deployment.aspx). 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?
Title: Re: WiX for Visio Add-ins and Content
Post by: Nikolay on March 11, 2015, 02:22:25 PM
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 (https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d) - 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).
Title: Re: WiX for Visio Add-ins and Content
Post by: Nikolay on March 12, 2015, 12:30:09 AM
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)
Title: Re: WiX for Visio Add-ins and Content
Post by: Nikolay on March 13, 2015, 05:22:56 PM
Ups, the video was marked as private  ???
Fixed
Title: Re: WiX for Visio Add-ins and Content
Post by: Visio Guy on March 17, 2015, 10: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

Title: Re: WiX for Visio Add-ins and Content
Post by: Nikolay on January 15, 2016, 09: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