Skip to content
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

Analyzer fixes can no longer be applied to the whole solution in Visual Studio #7394

Open
bitbonk opened this issue Aug 28, 2024 · 0 comments

Comments

@bitbonk
Copy link

bitbonk commented Aug 28, 2024

Analyzer

Diagnostic ID: RS0016: Add public types and members to the declared API (and other RS00XX analyzers seem to be affected to)

Analyzer source

NuGet Package: Microsoft.CodeAnalysis.NetAnalyzers

Version: 3.11.0-beta1.24324.1

Describe the bug

The analyzer fixes of Microsoft.CodeAnalysis.NetAnalyzers can no longer be applied to the whole solution.
When I choose "Solution" in the fix menu, the fix is only applied to one project in the solution, just as if I would have chosen "Project" in the fix menu.
This is rather problematic when you have a lot of RS00XX warnings and a big solution. This situation comes up more often than not, because sometimes you need to start from scratch in a solution with completely emptied PublicAPI.Unshipped.txt and PublicAPI.Shipped.txt files.

PublicAPIDemo

Steps To Reproduce

  1. Clone the repo https://github.com/bitbonk/PublicApiDemo
  2. Apply a fix for any RS0016 warning choosing "Solution" as the target.

Expected behavior

All RS0016 warnings in the whole solution are fixed (PublicAPI.Unshipped.txt in both MyClassLibrary1 and MyClassLibrary2 contain the API entries).

Actual behavior

Only RS0016 warnings of one project in the solution are fixed (only PublicAPI.Unshipped.txt in MyClassLibrary1 or MyClassLibrary2 contain the API entries).

Additional context

Microsoft Visual Studio Enterprise 2022 (64-bit) - Current
Version 17.11.1
.NET SDK 8.0.400

@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
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

No branches or pull requests

2 participants
@bitbonk and others