Skip to content

Reenable Microsoft.CodeAnalysis.PublicApiAnalyzers#13486

Draft
rainersigwald wants to merge 4 commits intodotnet:mainfrom
rainersigwald:roslyn-publicapi-baseline-18.6
Draft

Reenable Microsoft.CodeAnalysis.PublicApiAnalyzers#13486
rainersigwald wants to merge 4 commits intodotnet:mainfrom
rainersigwald:roslyn-publicapi-baseline-18.6

Conversation

@rainersigwald
Copy link
Copy Markdown
Member

@rainersigwald rainersigwald commented Apr 3, 2026

We had some problems with this analyzer and switched to the package-based compat analyzer in #8116. However, since then I've wished we had a more explicit indicator of adding public API, which PublicApiAnalyzers provides (in the form of requiring a diff to the PublicAPI.Unshipped.txt files).

There are some new rules in the newer versions of this analyzer that catch compat problems we introduced (and, unfortunately, shipped), so I have grandfathered those in with attribute-level suppressions.

  • Reenable Microsoft.CodeAnalysis.PublicApiAnalyzers
  • Suppress existing RS002* API-design violations
  • Add 18.6 PublicAPI shipped baselines

MichalPavlik and others added 4 commits April 2, 2026 13:12
## Release 18.6 — Phase 4: Final Branding

Tracking issue: dotnet#13468

### Changes
- Add \<DotNetFinalVersionKind>release</DotNetFinalVersionKind>\ on the
\VersionPrefix\ line (creates merge conflict for forward-flow)
- Change \PreReleaseVersionLabel\ from \preview\ to \servicing\

Generated by \scripts/Stabilize-Release.ps1\.

### Next steps after merge
- Bootstrap OptProf for \�s18.6\
- Babysit VS insertion PR into VS \main\ before insiders snap (Apr 3)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
I'm adjusting the TF-specific stuff to have more conventional names:
netfx for .NET Framework and, net for .NET 10/core.
Since we didn't catch these when we introduced them, baseline them, but
it looks like at least one VMR break could have been prevented with the
rules so let's keep them enabled.
Populate the restored PublicAPI baseline files for the shipping MSBuild assemblies from the 18.6 release surface and add matching empty unshipped files so PublicApiAnalyzer validates the branch cleanly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rainersigwald rainersigwald force-pushed the roslyn-publicapi-baseline-18.6 branch from c0df50c to e0277fa Compare April 3, 2026 17:01
<PropertyGroup>
<VersionPrefix>18.6.0</VersionPrefix>
<PreReleaseVersionLabel>preview</PreReleaseVersionLabel>
<VersionPrefix>18.6.0</VersionPrefix><DotNetFinalVersionKind>release</DotNetFinalVersionKind><!-- Keep next to VersionPrefix to create a conflict in forward-flow -->
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants