dotnet/roslyn

Allow PublicApiAnalyzers to track internal APIs with `[Internal]` prefix

Closed

#79,658 创建于 2025年7月29日

在 GitHub 查看
 (1 评论) (1 反应) (0 负责人)C# (4,257 fork)batch import
Area-AnalyzersArea-IDEhelp wanted

仓库指标

Star
 (20,414 star)
PR 合并指标
 (平均合并 6天 17小时) (30 天内合并 256 个 PR)

描述

Tracking internal APIs can be useful in cases where IVT is used and compatibility between different versions of components is required.

For example:

  • Project1 has a ProjectReference to Project2.
  • Project2 exposes IVT to Project1
  • Both projects produce NuGet packages
  • If I make a change in internal API in Project2 that is called by Project1, that means a binary incompatibility is introduced.

Suggestion: all internal APIs, unless annotated with EmbeddedAttribute, can be tracked as an opt-in feature.

That way, Project2 is forced to add EmbeddedAttribute when not intended to be used by IVT, and otherwise breaking changes can be tracked more easily.

贡献者指南