正常提示中出现错误,而不是ISE

时间:2017-04-13 08:53:11

标签: powershell assemblies dllimport

我遇到了以下错误:

Add-Type : Die Datei oder Assembly "file://\\myuncpath\my.dll" oder eine Abhängigkeit 
davon wurde nicht gefunden. Der Vorgang wird nicht unterstützt. (Ausnahme von HRESULT: 0x80131515)
In Zeile:1 Zeichen:1
+ Add-Type -Path "\\myuncpath\my.dll"     
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (:) [Add-Type], FileLoadException
        + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.AddTypeCommand

很抱歉它是德国人,但我想单独的堆栈跟踪也会有所帮助。

并按enabling loadFromRemoteSources修正了它。但是,这只是为Powershell ISE修复了它,而不是在我使用右键单击时启动的典型命令提示符 - > "执行Powershell脚本"。

配置不适用于正常提示吗?

英文错误:

Add-Type : Could not load file or assembly 'file://\\myuncpath\my.dl'
or one of its dependencies. Operation is not supported. (Exception from HRESULT: 0x80131515)
At line:1 char:1 + Add-Type -Path "\\myuncpath\my.dll"
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Add-Type], FileLoadException
    + FullyQualifiedErrorId : System.IO.FileLoadException,Microsoft.PowerShell.Commands.Ad‌​dTypeCommand

0 个答案:

没有答案