Skip to content

Make PublicApiAnalyzers support C# files for API representation #3901

@ericstj

Description

@ericstj

This is a feature request.

In thinking about how we can better represent API in dotnet/runtime while removing our custom tools and leveraging roslyn features we have found that it would be convenient to have this analyzer support C# files.

  1. We already represent API in C# files and it's most convenient for reviewers to view it this way.
  2. Some of our assemblies have differing assembly locations for ref vs def. We'd like to represent the API in a single C# file and implement it with mix of typeforwards and defs. By having this analyzer accept C# we could have it serve both purposes of building our reference assembly (which cannot use /refout, due to differing type locations) and performing our compatibility check.
  3. Presumably this feature would enable the analyzer or separate tool to emit C# which could eliminate the need to maintain our GenAPI tool.

/cc @Anipik @ViktorHofer @safern

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions