This post originated from an RSS feed registered with .NET Buzz
by Richard Jonas.
Original Post: Deploying a Managed COM Add-in using an Outlook Shim
Feed Title: Richard Jonas
Feed URL: http://feeds.feedburner.com/blogspot/ouNA
Feed Description: Richard Jonas's blog about .NET, web development and agile methodologies.
I have been trying to get a managed code outlook add-in to work using an "Outlook Shim", to remove a warning message about a potential security risk. This allows the add-in to be trusted without trusting all .NET managed code add-ins.
The Managed Code add-in needs to have a strong name. I needed to make some configuration changes to generate this. Firstly, I added the "AssemblyKeyFileAttribute" to the AssemblyInfo.cs file, like this.
I then found that my project referenced Microsoft.Office.Core. This is not strongly named, and this stops the managed code add-in from building. To get around this, I downloaded the Primary Interop Assemblies from here and replaced the references with these DLLs.
Apart from this, the instructions, although long and initially very daunting, seem to work. Does this need to be this complicated? There is a very strong temptation for people to instruct their users to ignore security risks and if they do so in your application they may think it's OK to do so at other times.