I am creating a solution that contains several solutions. All but one are built without problems. The problematic issues the following message:
Error 2 Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more info. J: \ MyPlugins \ MyPlugin1 \ SGEN MyPlugin1
I included detailed output in Visual Studio, and I got the following: C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ bin \ NETFX 4.0 Tools \ sgen.exe / assembly:
I checked the output with FusionLog and everything loaded correctly. It turned out to be a red herring. I decided to start the assembly again when verbosity unfolded. I got the following:
Microsoft (R) Xml Serialization Support Program [Microsoft (R) .NET Framework, version 4.0.30319.17929] Copyright (C) Microsoft Corporation. All rights reserved. If you need more help, enter "sgen /?". SGEN: error: cannot load one or more of the requested types. Get the LoaderExceptions property for more information. The command is completed with code 1. Completed task "SGen" - FAILED.
C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.0A \ bin \ NETFX 4.0 Tools \ sgen.exe / assembly: ": \ MyPlugins \ MyPlugin1.dll" / proxy types / reference: "J: \ MyPlugins \ MyPlugin1 \ packages \ FluentValidation.3.4.6.0 \ lib \ Net40 \ FluentValidation.dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ mscorlib.dll "/ reference : "J: \ MyPlugins \ MyPlugin1 \ Libraries \ Core \ bin \ Release \ Core.dll" / reference: "J: \ MyPlugins \ MyPlugin1 \ Libraries \ Services \ bin \ Release \ Services.dll" / reference: "J: \ MyPlugins \ MyPlugin1 \ Presentation \ Web.Framework \ bin \ Release \ Web.Framework.dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ System.Core .dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ System.Data.dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ System.dll "/ reference:" C: \ Program Files (x86) \ Refe rence Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ System.EnterpriseServices.dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ System.Web.dll "/ reference:" C: \ Program Files (x86) \ Microsoft ASP.NET \ ASP.NET MVC 4 \ Assemblies \ System.Web.Mvc.dll "/ link:" C: \ Program Files (X86) \ Assembly Link \ Microsoft \ Framework.NETFramework \ v4.0 \ System.Web.Services.dll "/ reference:" C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETFramework \ v4.0 \ system.Xml.dll "
What causes this error and how can I fix it without disabling SGEN? FYI, I did not write the code.
source share