Vault Add-In is not loading

Sometimes I write Vault add-ins for a customer, who downloads and installs my add-in correctly. In different szenarios the Vault-Explorer was not loading my add-in at all. The Vault-Explorer brings a dialog with the error-message: “Error loading Extension ….”. That’s it, no other information is there!

After searching a lot, I found this blog on the autodesk-website:

Doug Redmond explains how to enable extension-logging, to figure out why the add-in is not loading.

In my case, the logging was not very helpful. I got this log:

15.10.2012 18:00:31 ******************************************************************************
 Autodesk.Connectivity.Extensibility.Framework Error: 1 : System.NotSupportedException: An attempt was made to load an assembly from a network location which would have caused the assembly to be sandboxed in previous versions of the .NET Framework. This release of the .NET Framework does not enable CAS policy by default, so this load may be dangerous. If this load is not intended to sandbox the assembly, please enable the loadFromRemoteSources switch. See for more information.
 at System.Reflection.RuntimeAssembly.nLoadFile(String path, Evidence evidence)
 at System.Reflection.Assembly.LoadFile(String path)
 at Autodesk.Connectivity.Extensibility.Framework.ExtensionLoader.LoadExtension(Extension ext, ExtensionTypeEnum extType)
 at Autodesk.Connectivity.Extensibility.Framework.ExtensionLoader.LoadExtensions(ExtensionTypeEnum extensionType)

The message is talking about a problem by loading an assembly from a network location, but the customer installed the add-in on his machine!

The solution for this problem is very simple! The customer is downloading my add-in from our coolOrange website. If coolOrange is in his browser not marked as a trusted vendor, then the downloaded assemblies, executable or zip-archives are marked with a Blocked-flag. You see it, when you try to run an executable coming from the internet:

I solved the problem by right-clicking the assembly (executable, archive) in the windows-explorer and opening the Properties. You have to unblock the assembly now:

Now the assembly will be loaded from Vault!

A second solution that worked for me was changing the app.config from the Vault-explorer. You find the configuration in:

C:\Program Files\Autodesk\Vault Professional 2013\Explorer\Connectivity.VaultPro.exe.config.

At the end of the xml-file I inserted this lines:

<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    <loadFromRemoteSources enabled="true"/>

About weiss92

Software Developer
This entry was posted in Vault API and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s