Search code examples
c#vstoadd-inoffice-addinsms-project

VSTO. How to determine the project GUID?


I am trying to create an add-in.
I get an error.
I found a solution to the error - link.
To solve the error, the string HKEY_CURRENT_USER\Software\Microsoft\VSTA\Solutions\{GUID} is required.

Question: where can I get {GUID}?

enter image description here


Update-1

enter image description here


Updated-2

enter image description here


Updated-3

I seem to have found my add-on.
In my case, {GUID} = b037194d-afa5-4109-a7dd-36fbdd2d1610?
The address will look like this - HKEY_CURRENT_USER\Software\Microsoft\VSTA\Solutions\b037194d-afa5-4109-a7dd-36fbdd2d1610?

enter image description here


Solution

  • When you are publishing your addin using ClickOnce deployment in the options there is field called 'Product Name' which is added to the registry of your addin as 'String value'.

    enter image description here

    Here is the entry in the registry (HKEY_CURRENT_USER\Software\Microsoft\VSTA\Solutions)

    enter image description here

    In our deployment process we needed a post deployment action to set the icon of the application and the only way to find the GUID was registry seek in the Solution sub-path for entry with specific 'Product Name' - this is in case you need some automation.