Roslyn-analyzers: PublicApiAnalyzer Fix All duplicate entries for partial types

Created on 12 Mar 2019  路  4Comments  路  Source: dotnet/roslyn-analyzers

Analyzer package

Example: DotNetAnalyzers.PublicApiAnalyzer

Package Version

Example: 2.9.0-beta1.19162.2+321600d1

Diagnostic ID

Repro steps

Tested in Visual Studio 2017 version 15.9.8.

  1. Create a public partial type with parts in multiple files
  2. Delete the contents of the Public API files
  3. Apply a Fix All operation to add all the missing APIs

Expected behavior

The partial type appears once in PublicAPI.Unshipped.txt.

Actual behavior

The partial type appears once in PublicAPI.Unshipped.txt for each part.

4 - In Review Area-DotNetAnalyzers.PublicApiAnalyzer Bug Urgency-Soon

All 4 comments

@drewnoakes @genlu we have had bunch of reports of this duplicate entries issue now..

Hitting this issue now adding the analyser to the winforms repo, pretty annoying.

Also still having this issue. Note that at least in my experience, it not only adds an entry for the class for each part, but also if there's no explicit constructor it also adds a constructor entry for each type part found.

Any traction on this at all? It's been a year since this issue was posted and still no resolution, even with the Urgency-Soon tag.

Was this page helpful?
0 / 5 - 0 ratings