如何获取LoaderException财产?财产、LoaderException

由网友(蜀三川)分享简介:我得到一个错误信息,同时更新我的​​服务引用:I get a error message while updating my service reference:自定义工具警告:无法加载一个请求的类型的一种或多种。检索LoaderExceptions获取更多信息。的我怎样才能找回LoaderException财产?...

我得到一个错误信息,同时更新我的​​服务引用:

I get a error message while updating my service reference:

自定义工具警告:无法加载一个请求的类型的一种或多种。检索LoaderExceptions获取更多信息。的

我怎样才能找回LoaderException财产?

How can I retrieve the LoaderException property?

更新:我的错误,走了,当我重新导入域对象的项目。我不知道为什么这个固定的问题,但我很高兴它的工作。

Update: My errors went away when I reimported the domain object projects. I have no idea why this fixed the issue, but I'm happy it's working.

推荐答案

有没有在你的服务的code的一个问题?试试下面的代码段用于加载型或组件(在你的服务的code presumably)

Is there a problem in the code of your service? Try the snippet below for loading the type or assembly (presumably in the code of your service)


try
{
  // load the assembly or type
}
catch (Exception ex)
{
  if (ex is System.Reflection.ReflectionTypeLoadException)
  {
    var typeLoadException = ex as ReflectionTypeLoadException;
    var loaderExceptions  = typeLoadException.LoaderExceptions;
  }
}
阅读全文

相关推荐

最新文章