简体   繁体   中英

VSTO (Outlook Add-In) Setup Deployment (C#)

I am having some issues creating a setup file for my Outlook 2007 add-in.

The issue is that the Add-In needs to have a registry entry that references the manifest ( http://msdn.microsoft.com/en-us/library/bb386106.aspx ). The project builds a manifest file that appears in my bin\\debug folder. However, in my setup project, if I go and add project output, the manifest is never listed as part of the output. Oddly enough, the Setup does create a registry entry that references my manifest in my bin\\debug folder but this is not suitable since that folder is not available on the machines where I will be deployed to.

Thanks.

====================================

for those interested, some background issues.

  1. If I use project output in my setup, the VSTO add-in installs fine the first time. If I uninstall and reinstall using the same setup, it does not install properly. If I rebuild the setup, it installs fine again (in other words, it only installs the first time a setup is run).
  2. I corrected (1) but removing the project output from my setup project and instead adding the files manually (my dll + the manifest) and then updating the registry keys to point to the manifest added. This time, I can uninstall and reinstall as much as I want with the same setup. However, for some reason, the setup creates two registry entries, one that I have manually put in that refers to the manifest I included, and one that gets automatically referenced and points to the manifest in my bin\\debug folder. I am unable to remove this second set of registry entries as they do not appear anywhere in my setup project. The issue with leaving them there is that the add-in executes every command twice (since it is registered twice).

odd, eh?

I found this Microsoft white-paper on VSTO for office 2007 add-in deployment very useful: http://msdn.microsoft.com/en-us/library/cc563937(office.12).aspx
(I initially linked to another paper which is also great, but applies to 2003 + 2007, which is somewhat different: http://msdn.microsoft.com/en-us/library/bb332052.aspx )
Specifically on the question of the manifest, I found out the hard way that when the registry key for the add-in had the same name as the add-in itself, for some mysterious reason during the build, the Manifest value was being silently replaced from the VSTO manifest to the add-in manifest.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM