views:

490

answers:

2

I just installed Visual Studio 2010 yesterday. As part of that I installed VSTO 4.0. Now when I run any Office application, my VSTO 3.0 addins fail to load. The error in the event log is

Customization URI: file:///H:/PathToMyAddin/MyAddin.vsto Exception: Customization does not have the permissions required to create an application domain.

Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization does not have the permissions required to create an application domain. ---> System.Security.SecurityException: Customized functionality in this application will not work because the administrator has listed file:///H:/PathToMyAddin/MyAddin.vsto as untrusted. Contact your administrator for further assistance. at Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifySolutionUri(Uri uri) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor) The Zone of the assembly that failed was: MyComputer

It seems like like maybe this is due to it trying to load different version of .NET is the same process/AppDomain. However the error would indicate it's some sort of permissions issue.

A: 

I have the same problem, extremely annoying thanks Microsoft. Please post back if you've found a workaround, meantime i'll carry on Googling!

Wad
+1  A: 

It turns out that VSTO 4 doesn't trust add-ins on network locations by default. However, by adding the following registry key

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\vsto runtime Setup\v4]
"EnableVSTOLocalUNC"=dword:00000001

and re-enabling my add-in, it appeared to work as expected again.

Another option for some is just to install the add-in on the user's local machine instead of on a network location

Jacob Adams
what about trusting that location in Excel trusted locations (excel options)?
Anonymous Type
Not sure about Excel, but adding the location as a Word trusted location didn't help me.
Jacob Adams