News:

BB code in posts seems to be working again!
I haven't turned on every single tag, so please let me know if there are any that are used/needed but not activated.

Main Menu

WiX for Visio Add-ins and Content

Started by Visio Guy, March 11, 2015, 01:43:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Visio Guy

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?
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

#1
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).

Nikolay

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

Ups, the video was marked as private  ???
Fixed

Visio Guy

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

#5
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

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 280 (show)
Files included: 32 - 1207KB. (show)
Memory used: 1120KB.
Tokens: post-login.
Cache hits: 14: 0.00185s for 26,741 bytes (show)
Cache misses: 4: (show)
Queries used: 16.

[Show Queries]