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

相关文章
|
10月前
Could not find method debug()
Could not find method debug()
273 59
|
10月前
|
API Android开发 开发者
failed to set system property error code: 0x18
failed to set system property error code: 0x18
438 1
|
10月前
|
开发者 iOS开发
no identity found Command CodeSign failed with a nonzero exit code
no identity found Command CodeSign failed with a nonzero exit code
149 0
|
10月前
|
API Android开发 开发者
debug常见错误,出现debug时出现跑进为条件为false的if语句,DELETE_FAILED_INTERNAL_ERROR Error while In
debug常见错误,出现debug时出现跑进为条件为false的if语句,DELETE_FAILED_INTERNAL_ERROR Error while In
64 5
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 : ‘}‘
152 0
|
10月前
|
Perl
报错:error Parsing error: x-invalid-end-tag
报错:error Parsing error: x-invalid-end-tag
178 0
【问题记录】警告:warning.warn(‘Downloading:{}‘.format(url),DownloadWarning)
【问题记录】警告:warning.warn(‘Downloading:{}‘.format(url),DownloadWarning)
【问题记录】警告:warning.warn(‘Downloading:{}‘.format(url),DownloadWarning)
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
编译x264:avisynth_c.h:825:3: error: unknown type name ‘HMODULE‘
173 0
解决办法:error: unknown type name ‘__int64‘
解决办法:error: unknown type name ‘__int64‘
522 0