How to retrieve the LoaderException property?

前端 未结 4 1756
遥遥无期
遥遥无期 2020-11-28 08:21

I get a error message while updating my service reference:

Custom tool warning: Unable to load one or more of the requested types. Retrieve the LoaderExceptions

4条回答
  •  悲哀的现实
    2020-11-28 08:44

    catch (ReflectionTypeLoadException ex)
    {        
        foreach (var item in ex.LoaderExceptions)
        {
              MessageBox.Show(item.Message);                    
        }
    }
    

    I'm sorry for resurrecting an old thread, but wanted to post a different solution to pull the loader exception (Using the actual ReflectionTypeLoadException) for anybody else to come across this.

提交回复
热议问题