Manifest and VSTO file in Setup project do not automatically match the "Primary Output from YourOutlookAddIn" RRS feed

  • General discussion

  • I am new to Office Add-In development so I am sure I made this mistake by not paying attention to the project setup instructions very well.

    Just in case this helps somebody else, I would like to point out the following:

    Before creating a Setup Project in your solution, set your Active Solution Configuration to Release and then check your Active solution platform. In my case I had several projects with different platforms, so I was set to "Mixed Platforms". I actually was targeting Outlook 32-bit, so I had to change all projects to x86 or Win32.

    The Setup Project instructions that I followed directed me to add the "Primary Output" from my VSTO Add-In project, then to manually add the files "addin.dll.manifest" and "addin.vsto" from the "bin" folder. In my case I added these two xml files from the bin\Debug folder. I should have added them from the "bin\x86\Release" folder. (Either the instructions I followed were not clear or more likely I am too lazy to follow correctly).

    So I had the setup project and it seemed to be working on the development machine. Later on I wanted to deploy to another computer for end-user testing and the add-in would not load in Outlook. I had to turn on "assembly bind logging" to find out that the AddIn dll would not load because the "processor architecture" did not match. The VSTO said it was expecting "msil" but the assembly was "x86". So I tried manually editing the xml in the manifest. The error changed to a Cryptographic exception, the manifest signature was incorrect. So manually editing the manifest was a bad idea. I tried googling a solution unsuccessfully. I think I finally stumbled on the fact that the SourcePath in the manifest properties was linked back to the Debug folder. I might have assumed that the manifest files would update automatically when I changed the Build configuration from Debug to Release.

    So back to my original suggestion that the "Release" version of the manifest files should be added to the Setup Project in the first place to save confusion later.



    Regards, (Mr) Kim Groves
    Thursday, November 24, 2011 1:40 AM