-
Notifications
You must be signed in to change notification settings - Fork 6k
Update strong naming guidance for .NET libraries to only apply to applicable platforms #49026
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
base: main
Are you sure you want to change the base?
Conversation
…licable platforms Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard
There was a problem hiding this 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
There was a problem hiding this 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!
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## When to strong name .NET libraries |
I think this should be a question, not a directive
Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard
Internal previews