我想从Powershell引用.net 1.1程序集。我相信我已经尝试了1.0和2.0,并且我已经在Win XP和Win 7 64位上尝试过了。从Powershell调用.net 1.1
add-type -path "path-to-dll"
然后我得到以下错误:
Add-Type : Unable to load one or more of the requested types. Retrieve
the LoaderExceptions property for more information. At line:1 char:9
+ add-type <<<< -path "C:\Program Files\Propel Systems\Cimera eval\cimera common.dll"
+ CategoryInfo : NotSpecified: (:) [Add-Type], ReflectionTypeLoadException
+ FullyQualifiedErrorId : System.Reflection.ReflectionTypeLoadException,Microsoft.PowerShell.Commands.AddTypeCommand
我已经冲刷谷歌为PowerShell的是否支持1.1或没有,但无法找到答案。可以?
第二条消息说“检索LoaderExceptions属性..”。至于HOW,我绝对没有任何参考。
你有没有试过'[System.Reflection.Assembly] :: LoadFrom(“C:\ Your.dll”)'? – 2012-02-23 20:45:13
是的 - 奇怪的是,它的作品。谢谢 – Gwynge 2012-02-25 20:12:26