I have developed an VSTO add-in for Excel in C# as a Class Library. The add-in takes a third-party .exe as a reference. The sole purpose of the add-in is to exploit the functionality of the referenced .exe.
I now try to publish the add-in using ClickOnce. When I try to install the add-in it gives me an error: Reference in the manifest does not match the identity of the downloaded assembly ThridParty.exe
Looking for a solution online a lot of people suggest the following:
In project properties -> Application tab -> Resources -> checkbox Icon and manifest, the setting "Embed manifest with default settings" caused the problem. Setting it to "Create application without a manifest" fixes the problem. See: Error deploying ClickOnce application - Reference in the manifest does not match the identity of the downloaded assembly
I am quite a novice at developing in VSTO and C#, but as my understanding goes, the provided solution above does only work if my output type was an application. The same goes for a lot of the other solutions I have found online.
Can someone explain how I can publish my add-in with the third-party referenced .exe-file?
Here is how I solved the problem if anyone is in the same situation:
I assumed that the error was related to me publishing my VSTO .dll. Turns out the problem was with the .exe that threw the error. Luckily, the third-party .exe was open source, so I was able to download the sourcecode and rebuild and publish it with the "Create application without manifest" option.
This solved the problem. When I added the new .exe and published my VSTO .dll via ClickOnce everything went smooth.
The question is why this happens. Is it a bug, or is there a reason for this to happen? Seems like a lot of people have the same issue.