Skip to content

Stop referencing the outdated NetAnalyzers package#81855

Merged
jjonescz merged 5 commits intodotnet:mainfrom
jjonescz:81805-NetAnalyzers
Jan 15, 2026
Merged

Stop referencing the outdated NetAnalyzers package#81855
jjonescz merged 5 commits intodotnet:mainfrom
jjonescz:81805-NetAnalyzers

Conversation

@jjonescz
Copy link
Member

@jjonescz jjonescz commented Jan 5, 2026

Pointed out by @Youssef1313 in #81805 (comment).
Inspecting binlog of this PR's CI build shows NetAnalyzers are still included, but from SDK.


<!-- Disable SDK supplied netanalyzers as we reference them from nugets instead -->
<PropertyGroup>
<EnableNetAnalyzers>false</EnableNetAnalyzers>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't recall the defaults, but maybe for .NET Framework (maybe Standard as well?), this probably defaults to false. So better to explicitly set to true.

@jjonescz jjonescz marked this pull request as ready for review January 5, 2026 13:10
@jjonescz jjonescz requested a review from a team as a code owner January 5, 2026 13:10
333fred
333fred previously approved these changes Jan 5, 2026
@333fred 333fred dismissed their stale review January 5, 2026 19:15

Thought better of it

@333fred
Copy link
Member

333fred commented Jan 5, 2026

I'm concerned about this change. At any given time, there are at least 2 different SDKs that we are building with: the SDK from a vertical build in dotnet/dotnet, and the SDK installed locally. What if we start getting warnings in one that we can't address without getting warnings in the other?

@jjonescz
Copy link
Member Author

jjonescz commented Jan 6, 2026

We don't build with warnings-as-errors in source build and in unified build, I presume for this exact reason (we can already get different warnings due to having different compiler and other analyzers from the sdk). That's also not a roslyn-specific issue, it can happen to any vmr repo.

@jjonescz jjonescz requested a review from 333fred January 6, 2026 08:39
@jjonescz
Copy link
Member Author

@333fred do you still have concerns here?

@jjonescz jjonescz enabled auto-merge (squash) January 14, 2026 11:30
@jjonescz jjonescz merged commit ea8b3d6 into dotnet:main Jan 15, 2026
28 of 29 checks passed
@jjonescz jjonescz deleted the 81805-NetAnalyzers branch January 15, 2026 11:03
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jan 15, 2026
@davidwengier davidwengier modified the milestones: Next, 18.4 Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants