-
Notifications
You must be signed in to change notification settings - Fork 463
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
NullReferenceException from CA1861 #6686
Comments
Hi @mavasani, I am starting to face this issue on our projects. This seems to correlate with the upgrade of public TestObjectConverter7()
{
TestPropertyCtor = typeof(TestProperty).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance, null, new Type[0], null);
} error
Is it just waiting for deployment? |
@Evangelink - that is correct. Can you try the latest preview NuGet package: https://dev.azure.com/dnceng/public/_artifacts/feed/dotnet8/NuGet/Microsoft.CodeAnalysis.NetAnalyzers/overview/8.0.0-preview.23360.1? |
@mavasani I confirm that works by manually referencing this package. Are analyzers only inserted in SDK or also in VS? For the SDK, do you know in which preview they will get shipped (we current use 8.0.100-preview.5.23303.2 - https://github.com/microsoft/vstest/blob/main/global.json#L3) |
|
It seems the fix built into version is |
Analyzer
Diagnostic ID: CA1861:
Avoid constant arrays as arguments
Analyzer source
SDK: Built-in CA analyzers in .NET 8 Preview 5 SDK
Version: 8.0.100-preview.5.23303.2
Describe the bug
When running analysis on the snippet below I get
Steps To Reproduce
Expected behavior
There should not be an AD0001 in the Error List
Actual behavior
There is an AD0001 in the Error List
Additional context
The text was updated successfully, but these errors were encountered: