From b058398dd06c80671289b0cf1d307ebd88f27cf8 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 8 Oct 2025 10:15:08 -0500 Subject: [PATCH 1/5] Update strong naming guidance for .NET libraries to only apply to applicable platforms Since Strong Naming has no impact on modern .NET Runtimes, limit the scope of guidance to .NET Framework and .NET Standard --- docs/standard/library-guidance/strong-naming.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index e922903ac103a..39d15777602af 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -41,7 +41,9 @@ You should strong name your open-source .NET libraries if their targets include > [!NOTE] > This guidance is specific to publicly distributed .NET libraries, such as .NET libraries published on NuGet.org. Strong naming is not required by most .NET applications and should not be done by default. -✔️ CONSIDER strong naming your library's assemblies. +✔️ CONSIDER strong naming your library's assemblies if you target .NET Framework or .NET Standard. + +> Strong naming has no impact on modern .NET Runtimes, so if you only target .NET then you can skip it. ✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system. From 0481a727e4287bf3f7c87df6879cc9e4a858cef6 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 8 Oct 2025 10:40:35 -0500 Subject: [PATCH 2/5] Update docs/standard/library-guidance/strong-naming.md Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com> --- docs/standard/library-guidance/strong-naming.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index 39d15777602af..fc356fbab32c0 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -43,7 +43,7 @@ You should strong name your open-source .NET libraries if their targets include ✔️ CONSIDER strong naming your library's assemblies if you target .NET Framework or .NET Standard. -> Strong naming has no impact on modern .NET Runtimes, so if you only target .NET then you can skip it. +> Strong naming has no impact on modern .NET runtimes. If your library only targets .NET, then you don't need to strong name your assemblies. ✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system. From 63635a515aaea952438a853749344c0fe1a20edd Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 8 Oct 2025 10:45:52 -0500 Subject: [PATCH 3/5] clarify multi-targeting guidelines If multitargeting, strong naming should be done for all TFMs so that InternalsVisibleTo attributes can remain consistent. --- docs/standard/library-guidance/strong-naming.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index fc356fbab32c0..657249192593b 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -41,9 +41,10 @@ You should strong name your open-source .NET libraries if their targets include > [!NOTE] > This guidance is specific to publicly distributed .NET libraries, such as .NET libraries published on NuGet.org. Strong naming is not required by most .NET applications and should not be done by default. -✔️ CONSIDER strong naming your library's assemblies if you target .NET Framework or .NET Standard. +✔️ CONSIDER strong naming your library's assemblies if you only target .NET Framework or .NET Standard. -> Strong naming has no impact on modern .NET runtimes. If your library only targets .NET, then you don't need to strong name your assemblies. +> Strong naming has no impact on modern .NET runtimes. If your library only targets modern .NET, then you don't need to strong name your assemblies. +> If you multi-target across .NET Framework/.NET Standard _and_ modern .NET, then you should strong name across all of your Target Frameworks. ✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system. From 38aa300be910e2b72d50a244ce9f76303d510160 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Wed, 8 Oct 2025 10:47:00 -0500 Subject: [PATCH 4/5] fix spacing --- docs/standard/library-guidance/strong-naming.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index 657249192593b..b62570d71f101 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -44,6 +44,7 @@ You should strong name your open-source .NET libraries if their targets include ✔️ CONSIDER strong naming your library's assemblies if you only target .NET Framework or .NET Standard. > Strong naming has no impact on modern .NET runtimes. If your library only targets modern .NET, then you don't need to strong name your assemblies. + > If you multi-target across .NET Framework/.NET Standard _and_ modern .NET, then you should strong name across all of your Target Frameworks. ✔️ CONSIDER adding the strong naming key pair (public + private) to your source control system. From 9efc8978441d1c59634197bfcd68c3848dd7ee77 Mon Sep 17 00:00:00 2001 From: David Pine Date: Mon, 13 Oct 2025 09:37:42 -0500 Subject: [PATCH 5/5] Update strong-naming.md --- docs/standard/library-guidance/strong-naming.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/standard/library-guidance/strong-naming.md b/docs/standard/library-guidance/strong-naming.md index b62570d71f101..429e261886861 100644 --- a/docs/standard/library-guidance/strong-naming.md +++ b/docs/standard/library-guidance/strong-naming.md @@ -1,7 +1,7 @@ --- title: Strong naming and .NET libraries description: Best practice recommendations for strong naming .NET libraries. -ms.date: 10/16/2018 +ms.date: 10/13/2025 --- # Strong naming @@ -34,9 +34,9 @@ The benefits of strong naming on .NET Framework are: 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 +## When to strong name .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. +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. > [!NOTE] > This guidance is specific to publicly distributed .NET libraries, such as .NET libraries published on NuGet.org. Strong naming is not required by most .NET applications and should not be done by default.