Issue:

When using Vault Data Standard for Inventor and powerEvents within an Inventor session, the registered PowerShell events do not get raised any more and the Logfile contains the following warning message:

2018-08-27 12:04:24,613 [Pipeline Execution Thread] WARN  powerVault.Cmdlets.Cmdlets.Vault.VaultPowerShellVariables - VaultPowerShellVariables.Initialize({powerVault.Cmdlets.Cmdlets.Vault.Facade.VaultPowerShellProxy}) | Failed, exception = {MissingMethodException}.
System.MissingMethodException: Method not found: 'Autodesk.Connectivity.Explorer.ExtensibilityTools.IExplorerUtil coolOrange.VaultServices.Vault.IVaultServices.get_ExplorerUtil()'.
   at powerVault.Cmdlets.Cmdlets.Vault.Facade.VaultConnectionBase.get_ExplorerUtil()
   at powerVault.Cmdlets.Cmdlets.Vault.VaultPowerShellVariables.Initialize(IVaultConnection vaultConnection)


This happens only in situations where Data Standard functionality is already used before powerEvents raises its first powerShell event.


Cause:

powerEvents is loading the assembly Autodesk.Connectivity.Explorer.ExtensibilityTools.dll from the Vault Explorer installation directory on Inventor startup.

Vault Data Standard for Inventor provides its own version of the assembly Autodesk.Connectivity.Explorer.ExtensibilityTools.dll within its installation directory. This version gets loaded and used the first time Data Standard functionality gets used within Inventor.

Since both versions of the same assembly are loaded, assembly conflicts are causing the powerShell events to not become executed at all.


Solution:

For the moment there are following workarounds to solve this issue:

  • Since  the powerEvents powerShell scripts are getting executing when the first Vault connection is created within Inventor, the easiest solution is to load the assembly Autodesk.Connectivity.Explorer.ExtensibilityTools.dll into the same LoadFrom context as Vault Data Standard for Inventor does. This can be achieved by adding following line at the top of your custom script, for loading the assembly from the Vault installation directory:  
    [Reflection.Assembly]::LoadFrom("C:\Program Files\Autodesk\Vault Professional [VERSION]\Explorer\Autodesk.Connectivity.Explorer.ExtensibilityTools.dll")


  • Remove the file Autodesk.Connectivity.Explorer.ExtensibilityTools.dll from the 'Vault Data Standard for Inventor' installation directory, e.g. %ProgramData%\Autodesk\Inventor 2018\Addins\Data Standard.