Deployment of VSTO add-ins have always been tricky. In Office 2007 we could deploy a VSTO Add-in for All users(after the hotfix) but if the assembly is not signed with a Trusted Publisher’s Certificate, each user sees the Microsoft Office Customization Installer dialog box (also know as the trust prompt) asking them if they want to install the add-in the very first time the add-in is loaded. If they choose to install the add-in, the add-in will run and they will not be prompted again. If they choose to not install the add-in, the add-in will not load and they will continue to see this trust prompt every time they open up the Office application and the add-in tries to load.
We could also avoid the Trust Prompts by creating a Inclusion List entry on a per user basis.The Registry propagation mechanism could be used to replicate the Inclusion List registry key to HKCU hive.
If you are developing your solution with Visual Studio 2010 and targeting .NET 4, an alternative to signing with a Trusted Publisher certificate and using Inclusion List is to install the add-in into the machines Program Files location. This location needs administrative privilege to write to and will be inherently trusted by VSTO, so there will be no trust prompt. We don’t have to worry about signing with a Trusted Publisher certificate and Inclusion Lists.
If you ask me? This is the BEST change in the Office Deployment space!
Note:This issue is now addressed in Exchange 2010 SP3 RU2 and it will be addressed for Exchange 2013 in the next cumulative update.
Have you tried install Installing a Transport Agent that is built with Exchange 2010 pre SP 1 binaries on Exchange 2010 SP 1? If not try it and you will get a error:
The TransportAgentFactory type "YourNamespace.YourAgentFactory" doesn't exist. The TransportAgentFactory type must be the Microsoft .NET class type of the transport agent factory.Parameter name: TransportAgentFactory + CategoryInfo : InvalidArgument: (:) [Install-TransportAgent], ArgumentException + FullyQualifiedErrorId : 6F5E297B,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent
This error is happening because while installing when the agent assembly is loaded, we check for all the Types associated with it and that where it fails as it is looking for the old build of the Microsoft.Exchange.Data.Common.dll and Microsoft.Exchange.Data.Transport.dll which is not there on the system. I tried copying the Microsoft.Exchange.Data.Common.dll and Microsoft.Exchange.Data.Transport.dll to the folder where the agent is installed and then I get a different error:
There is no known TransportAgentFactory interface implemented by the specified TransportAgentFactory "YourNamespace.YourAgentFactory".Parameter name: TransportAgentFactory + CategoryInfo : InvalidArgument: (:) [Install-TransportAgent], ArgumentException + FullyQualifiedErrorId : 7804297B,Microsoft.Exchange.Management.AgentTasks.InstallTransportAgent
The resolution is simple, recompile the Agent after adding references to the Microsoft.Exchange.Data.Common.dll and Microsoft.Exchange.Data.Transport.dll from the SP 1 build(18.104.22.168) and then installing the latest build.
Surprisingly an Agent compiled with Exchange 2007 binaries installs without an issue! Why?
This happens because we have a redirection policy in place for Exchange 2007. If you look into the GAC, there are two files named policy.8.0.Microsoft.Exchange.Data.Common and policy.8.0.Microsoft.Exchange.Data.Transport that redirect all old assembly(Exchange 2007) references to the latest build(22.214.171.124) and it just works. Unfortunately, we do not have one for the pre SP 1 and that the reason it fails.
The only solution as of now is to recompile the Transport Agent with the latest binaries from Exchange 2010 SP 1. The issue is being worked upon and we might have a FIX in the near future!