Skip to content

Conversation

baronfel
Copy link
Member

@baronfel baronfel commented Oct 8, 2025

Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard


Internal previews

📄 File 🔗 Preview link
docs/standard/library-guidance/strong-naming.md docs/standard/library-guidance/strong-naming

…licable platforms

Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard
@Copilot Copilot AI review requested due to automatic review settings October 8, 2025 15:15
@baronfel baronfel requested review from a team, IEvangelist and JamesNK as code owners October 8, 2025 15:15
@dotnetrepoman dotnetrepoman bot added this to the October 2025 milestone Oct 8, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

Updates strong naming guidance for .NET libraries to clarify that it only applies to .NET Framework and .NET Standard, not modern .NET runtimes. This change helps developers understand when strong naming is actually necessary.

  • Modified the primary recommendation to specify targeting .NET Framework or .NET Standard
  • Added explanatory note that strong naming has no impact on modern .NET runtimes

Copy link
Contributor

@gewarren gewarren left a comment

Choose a reason for hiding this comment

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

Left a suggestion for consideration. Thanks for adding this!

baronfel and others added 3 commits October 8, 2025 10:40
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
If multitargeting, strong naming should be done for all TFMs so that InternalsVisibleTo attributes can remain consistent.

## Create strong named .NET libraries

You should strong name your open-source .NET libraries if their targets include .NET Framework or .NET Standard. Strong naming is not required for libraries that target .NET Core/5+ only.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Strong naming is not required for libraries that target .NET Core/5+ only. You should strong name your open-source .NET libraries if their targets include .NET Framework or .NET Standard.

We should lead with ,NET Core.


Strong naming has no benefits on .NET Core/5+. C# compiler produces CS8002 warning for strong-named assemblies referencing non-strong named assemblies. It is fine to suppress this warning for libraries that target .NET Core/5+ only.

## Create strong named .NET libraries
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
## When to strong name .NET libraries

I think this should be a question, not a directive

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants