The compiler failed with the following message: "Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information."
I know this has something to do with serialization (as soon as I uncomment a method tagged with [OnSerialized] the build fails.
How can I inspect LoaderExceptions? Or more generally speaking how can I trap and inspect any exceptions thrown by c# compiler?
You could try running csc.exe under windbg.exe and inspect the managed exceptions getting thrown. If there's a particular first chance exception that you need to break on, you can issue the sxe <exception>
command. Then, load the sos.dll ( .loadby sos.dll mscorwks
) extension and inspect the exception getting thrown with !pe
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.