-
Notifications
You must be signed in to change notification settings - Fork 468
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Many analyzers throw ArgumentNullException when compiling VB.NET code #4840
Comments
The stack trace showing the exception around: roslyn-analyzers/src/Utilities/Compiler/Options/AggregateCategorizedAnalyzerConfigOptions.cs Lines 110 to 122 in 5102a0d
As far as I understand, the |
Probably worth checking the package version, I think I fixed a similar issue recently. |
Can you please try latest NuGet package instead of analyzers in the 5.0 SDK? |
Adding a package reference to In fact, looks like it was fixed in v5.0.1. Installing 5.0.0 caused the exceptions to be thrown, but 5.0.1 worked fine. |
Analyzer
Diagnostic ID:
Analyzer source
SDK: Built-in CA analyzers in .NET 5 SDK or later
Version: SDK 5.0.103
Describe the bug
Using an
AnalysisMode
ofAllEnabledByDefault
causes the analyzers listed above to throw anArgumentNullException
in VB.NET projects. This occurs in even the most minimal application.Steps To Reproduce
Use this code file:
and this project file:
Compile the code:
The output is:
The exceptions all seem to be the same. I've attached a truncated log from a build that used detailed verbosity.
Expected behavior
The analyzers don't throw exceptions.
Actual behavior
The analyzers throw exceptions.
Additional context
TargetFramework
tonetcoreapp3.1
and enablingEnableNETAnalyzers
doesn't throw any exceptions.The text was updated successfully, but these errors were encountered: