Debug add-type 的错误信息

简介:

在使用add-type添加类的时候我们无法判断具体的错误原因

Image

可使用以下方法:

try {Add-Type -Path "C:\lync2013\Microsoft.Lync.Model.dll"} 

catch [Reflection.ReflectionTypeLoadException]{$_.Exception.LoaderExceptions}

 

Image

 

可清晰看到错误的原因



转自handsome7038 51CTO博客,原文链接:http://blog.51cto.com/lixiaosong/1609244

相关文章
|
小程序
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
小程序踩坑:Setting data field "xxxx" to undefined is invalid.
316 0
|
8月前
Could not find method debug()
Could not find method debug()
265 59
|
8月前
|
API Android开发 开发者
failed to set system property error code: 0x18
failed to set system property error code: 0x18
358 1
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
error C2449: found ‘{‘ at file scope (missing function header?)和error C2059: syntax error : ‘}‘
138 0
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
166 0
解决办法:error: unknown type name ‘__int64‘
解决办法:error: unknown type name ‘__int64‘
515 0
|
Linux
编译OpenJDK8:error: control reaches end of non-void function [-Werror=return-type]
编译OpenJDK8:error: control reaches end of non-void function [-Werror=return-type]
198 0
|
程序员 算法框架/工具 Caffe
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
解决办法:error: 'size_t' does not name a type、unknown type name 'size_t'
771 0
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
196 0