Debug add-type 的錯誤信息

在使用add-type添加類的時候咱們沒法判斷具體的錯誤緣由ide

Image

可以使用如下方法:3d

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

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

 

Image

 

可清晰看到錯誤的緣由it

相關文章
相關標籤/搜索