我尝试在 PowerShell v2.0 中从.NET 4.0 beta2加载 PresentationFramework.dll 。但它失败并出现以下错误。
PS C:\Windows\system32> [Reflection.Assembly]::LoadFile("C:\Windows\Microsoft.NET\Framework\v4.0.21006\WPF\PresentationF ramework.dll")
使用“1”参数调用“LoadFile”的异常:“此程序集由比当前加载的运行时更新的运行时构建,无法加载。(来自 HRESULT 的异常:0x8013101B)”在第 1 行字符:32 + [ Reflection.Assembly]::LoadFile <<<< ("C:\Windows\Microsoft.NET\Framework\v4.0.21006\WPF\PresentationFramework.dll") + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId :点网方法异常
如何在 PowerShell 2.0 中加载此 DLL 文件?