Add-ErpMedia fails with "Cannot find type [powerGate.UI.Windows.ConnectionErrorDialog]" in 2026
Description
Add-ERPMedia fails with "Cannot find type [powerGate.UI.Windows.ConnectionErrorDialog]" when it is called in a function defined in a module that is called from the bom window with -NoWait switch.
The log file contains something like this
System.Management.Automation.CmdletInvocationException: Cannot find type [powerGate.UI.Windows.ConnectionErrorDialog]: verify that the assembly containing this type is loaded.
at , C:\Program Files\coolOrange\Modules\powerGate\powerGate_Connections.psm1: line 65
at AddErpMediaTest, C:\ProgramData\coolOrange\Client Customizations\Modules\AddErpMediaTest.psm1: line 6
at Check-Items, C:\ProgramData\coolOrange\Client Customizations\bomwindowtest.ps1: line 7
Cause
Currently under investigation.
This only happens when Add-ERPMedia is called in a function that is defined in a module and Show-BomWindow is called with the -NoWait switch.
Solution
If any of the conditions above are not met the issue doesn't happen anymore.
* Call Show-BomWindow without the -NoWait switch
* Define the function directly in your script or call Add-ERPMedia directly in your script
If both of those are not possible there is also a third option to use the default assembly load context. This might cause compatibility issues with other Vault extensions so you should test properly if you choose this.
Open "C:\ProgramData\Autodesk\Vault 2026\Extensions\powerEvents.NetCore\powerEvents.vcet.config"
Change "<extension type="powerEvents.WebServiceExtension.VaultWebServiceExtension_IsolatedInSeparateLoadContext"
to