I am compiling a project using csc.exe, with the /analyzer: flag pointing to the paths of ErrorProne.Net.CoreAnalyzers.dll and ErrorProne.Net.Core.dll, which are built from my clone of the library here.
However, I see several error messages like these:
"warning CS8032: An instance of analyzer ErrorProne.NET.AsyncAnalyzers.ConcurrentCollectionAnalyzer cannot be created from C:\Repos\RoslynExample\RoslynExample\ErrorProne.Net.CoreAnalyzers.dll : Exception has been thrown by the target of an invocation."
"warning CS8032: An instance of analyzer ErrorProne.NET.AsyncAnalyzers.AddConfigureAwaitAnalyzer cannot be created from C:\Repos\RoslynExample\RoslynExample\ErrorProne.Net.CoreAnalyzers.dll : Exception has been thrown by the target of an invocation."
etc.
I would like to get more debug information, so that I know exactly when and where these errors are thrown, as well as their inner exceptions. As of now, these error messages on their own are useless.
It is important that I am able to print the stack traces (especially the inner exceptions) to console, or write it to file.
How can I get a copy of the stack trace?
UPDATE:
I figured out the cause of these errors by 1) creating a console application which runs the analyzers built from my clone of the Error.Net source code, 2) disabling Just My Code, and 3) breaking on all exceptions. While it is great to finally figure out what the problem is, it still leaves my original question unanswered: How can I get access to the inner exceptions (so that I can display them later) just by running csc.exe?