Visual Studio Setup Registry Entries for VSTO Addin Deployment

OK so I’m building a Project 2010 addin using Visual Studio 2010 (VSTO) and I got tired of the clickonce deployment option. I added a Visual Studio installer project to my solution and went about following the advice on this page: http://msdn.microsoft.com/en-us/vsto/ff937654.aspx It was mostly pretty good. A bit confusingly worded in a few places but I wrote that off to me not having enough real development background to pick up on the flow as I might if I was an experienced dev. In the section on registry entries it made mention of this page: http://msdn.microsoft.com/en-us/library/bb386106.aspx . It also showed sample registry entries settings and how to set them up in your installer project. I followed these to the letter and matched mine up with their screenshot to make sure they matched. For the Manifest entry mine was: "[TARGETDIR]ADDINNAME.vsto|vstolocal" I used this and my addin installed the proper ribbon tabs and buttons which meant that the system was able to interpret my entry enough to install my code into Project 2010. But some of my code was not quite working properly. Two of my dialog boxes should have read in a default value from an Application setting but the combobox controls that should have contained these defaults were blank. Click events for buttons were not firing off the code connected to them. The load event of a graphing control did not fire so while the graph control was there with the right visual settings it contained no data. I spent most of last night and much of the early part of this morning trying to figure out what was going wrong. I rebuilt my setup project from scratch. I double checked dependencies and looked to make sure I was building my setup project based on the right output, etc, etc. No Joy. I then checked in with old friend Colby Africa, one of the resident developer geniuses over at forProject to see what I was doing wrong. He had seen some roughly similar oddities in one of his projects and his research with his contacts suggested that I needed to add ‘file:///’ to the beginning of my registry setting in my Manifest key. It had something to do with the way the system interpreted the entry. I was skeptical but did it anyway. My Manifest entry was now “file:///[TARGETDIR]ADDINNAME.vsto|vstolocal". I rebuilt my setup project and reinstalled my addin and poof! It worked! As always, having smart friends is at least as important as being smart yourself! 🙂

See the rest here:
Visual Studio Setup Registry Entries for VSTO Addin Deployment


Leave a comment!

You must be logged in to post a comment.