-
Notifications
You must be signed in to change notification settings - Fork 470
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
After upgrading VS to 17.5.0 I'm getting CA1825 warnings in attributes #6500
Comments
Me too, I'm seeing this in my Analyzers projects when declaring |
we are also seeing this with
also targeting net6 |
See the note on false positives in https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1825#when-to-suppress-warnings. |
You'll need to either upgrade the version of analyzers you are using, or suppress these false positives. |
Analyzer
Diagnostic ID: CA1825:
Avoid zero-length array allocations
Analyzer source
SDK: Built-in CA analyzers in .NET 6 SDK
Version: SDK 6.0.406
Describe the bug
Updated my installation to 17.5.0 then restarted my PC, after that I compiled my solution and saw CA1855 warnings on the Controllers in the Produce attributes:
[Produces(MediaTypeNames.Application.Json)]
Expected behavior
No warnings
Actual behavior
CA1825 warnings on attributes.
Additional context
Building the solution with the CLI using
dotnet build
builds correctly.I'm targeting net6 using the lang version 10.
The text was updated successfully, but these errors were encountered: