问题描述
我正在尝试在 PowerShell 中使用以下代码加载 WinSCPnet.dll
文件,但出现以下错误。
Set-Location "D:\WinSCP-5.17.10-Automation"
Add-Type -Path "WinSCPnet.dll"
Add-Type : 无法加载文件或程序集 'file:///D:\WinSCP-5.17.10-Automatio
n\WinSCPnet.dll' 或其依赖项之一。此程序集由比当前加载的运行时更新的运行时构建,无法加载。
在行:2 字符:9
+ 添加类型
+ CategoryInfo : NotSpecified: (:) [Add-Type],BadImageFormatExce
选项
+ FullQualifiedErrorId : System.BadImageFormatException,Microsoft.PowerSh
ell.Commands.AddTypeCommand
是否有其他方法可以在 PowerShell 2.0 中添加此程序集,如果不支持,是否有任何可用的 WinSCPnet.dll
支持 PowerShell 2.0?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)