From 89439a72c52fd3659909cffe8a2dbe51305c39be Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 13 Apr 2026 19:08:44 +0000
Subject: [PATCH 1/3] Add docs for NETSDK1237 diagnostic
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/4f8fd133-0e75-4727-9793-9d6773e18749
Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
---
docs/core/tools/sdk-errors/index.md | 1 +
docs/core/tools/sdk-errors/netsdk1237.md | 32 ++++++++++++++++++++++++
docs/navigate/tools-diagnostics/toc.yml | 2 ++
3 files changed, 35 insertions(+)
create mode 100644 docs/core/tools/sdk-errors/netsdk1237.md
diff --git a/docs/core/tools/sdk-errors/index.md b/docs/core/tools/sdk-errors/index.md
index cf4e02e65e40b..be6e12921bf44 100644
--- a/docs/core/tools/sdk-errors/index.md
+++ b/docs/core/tools/sdk-errors/index.md
@@ -374,3 +374,4 @@ This list is a complete list of the errors that you might get from the .NET SDK
|NETSDK1211|EnableSingleFileAnalyzer is not supported for the target framework. Consider multi-targeting to a supported framework to enable single-file analysis, and set EnableSingleFileAnalyzer only for the supported frameworks. For example:
`true`|
|NETSDK1212|IsTrimmable and EnableTrimAnalyzer are not supported for the target framework. Consider multi-targeting to a supported framework to enable trimming, and set IsTrimmable only for the supported frameworks. For example:
`true`|
|NETSDK1213|Targeting .NET 8.0 or higher in Visual Studio 2022 17.7 is not supported.|
+|[NETSDK1237](netsdk1237.md)|Assembly '{0}' was listed in PublishReadyToRunPartialAssemblies but is being compiled into a composite image. Partial compilation is only supported for assemblies compiled separately. The assembly will be compiled fully into the composite image.|
diff --git a/docs/core/tools/sdk-errors/netsdk1237.md b/docs/core/tools/sdk-errors/netsdk1237.md
new file mode 100644
index 0000000000000..3807f9181990c
--- /dev/null
+++ b/docs/core/tools/sdk-errors/netsdk1237.md
@@ -0,0 +1,32 @@
+---
+title: "NETSDK1237: Assembly listed in PublishReadyToRunPartialAssemblies but compiled into a composite image"
+description: Learn about .NET SDK warning NETSDK1237, which occurs when an assembly is listed in PublishReadyToRunPartialAssemblies but is being compiled into a ReadyToRun composite image.
+ms.topic: error-reference
+ms.date: 04/13/2026
+f1_keywords:
+- NETSDK1237
+ai-usage: ai-generated
+---
+# NETSDK1237: Assembly listed in PublishReadyToRunPartialAssemblies but compiled into a composite image
+
+NETSDK1237 is a warning that an assembly listed in `PublishReadyToRunPartialAssemblies` is also being compiled into a [ReadyToRun composite image](../../deploying/ready-to-run.md). Partial compilation is only supported for assemblies compiled separately. The assembly is compiled fully into the composite image and the `PublishReadyToRunPartialAssemblies` setting for it is ignored.
+
+This situation occurs when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
+
+```xml
+
+
+ true
+ true
+
+
+
+
+
+
+```
+
+To resolve this warning, choose one of the following options:
+
+- Remove the assemblies from `PublishReadyToRunPartialAssemblies` if you want them compiled fully into the composite image.
+- Set `PublishReadyToRunComposite` to `false` if you want to compile assemblies partially and separately instead of into a composite image.
diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml
index a95a2784c5e50..f5ba410150e8c 100644
--- a/docs/navigate/tools-diagnostics/toc.yml
+++ b/docs/navigate/tools-diagnostics/toc.yml
@@ -91,6 +91,8 @@ items:
href: ../../core/tools/sdk-errors/netsdk1202.md
- name: NETSDK1206
href: ../../core/tools/sdk-errors/netsdk1206.md
+ - name: NETSDK1237
+ href: ../../core/tools/sdk-errors/netsdk1237.md
- name: BuildCheck rules
items:
- name: Index of rules
From 4edc563eae38df1cadfaeb4f3a47cbd430cf81a4 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Mon, 13 Apr 2026 19:09:23 +0000
Subject: [PATCH 2/3] Apply active voice review feedback to netsdk1237.md
Agent-Logs-Url: https://github.com/dotnet/docs/sessions/4f8fd133-0e75-4727-9793-9d6773e18749
Co-authored-by: jkoritzinsky <1571408+jkoritzinsky@users.noreply.github.com>
---
docs/core/tools/sdk-errors/netsdk1237.md | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/core/tools/sdk-errors/netsdk1237.md b/docs/core/tools/sdk-errors/netsdk1237.md
index 3807f9181990c..c33b514bbf817 100644
--- a/docs/core/tools/sdk-errors/netsdk1237.md
+++ b/docs/core/tools/sdk-errors/netsdk1237.md
@@ -9,9 +9,9 @@ ai-usage: ai-generated
---
# NETSDK1237: Assembly listed in PublishReadyToRunPartialAssemblies but compiled into a composite image
-NETSDK1237 is a warning that an assembly listed in `PublishReadyToRunPartialAssemblies` is also being compiled into a [ReadyToRun composite image](../../deploying/ready-to-run.md). Partial compilation is only supported for assemblies compiled separately. The assembly is compiled fully into the composite image and the `PublishReadyToRunPartialAssemblies` setting for it is ignored.
+NETSDK1237 warns you when you list an assembly in `PublishReadyToRunPartialAssemblies` but also compile it into a [ReadyToRun composite image](../../deploying/ready-to-run.md). You can only use partial compilation for assemblies compiled separately. The SDK compiles the assembly fully into the composite image and ignores the `PublishReadyToRunPartialAssemblies` setting for it.
-This situation occurs when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
+This warning appears when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
```xml
From 112edb2cc5d932efab0d519e828a73b1e8a18c9a Mon Sep 17 00:00:00 2001
From: Jeremy Koritzinsky
Date: Tue, 14 Apr 2026 14:36:31 -0700
Subject: [PATCH 3/3] Update docs/core/tools/sdk-errors/netsdk1237.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
docs/core/tools/sdk-errors/netsdk1237.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docs/core/tools/sdk-errors/netsdk1237.md b/docs/core/tools/sdk-errors/netsdk1237.md
index c33b514bbf817..83ac55a63588e 100644
--- a/docs/core/tools/sdk-errors/netsdk1237.md
+++ b/docs/core/tools/sdk-errors/netsdk1237.md
@@ -11,7 +11,7 @@ ai-usage: ai-generated
NETSDK1237 warns you when you list an assembly in `PublishReadyToRunPartialAssemblies` but also compile it into a [ReadyToRun composite image](../../deploying/ready-to-run.md). You can only use partial compilation for assemblies compiled separately. The SDK compiles the assembly fully into the composite image and ignores the `PublishReadyToRunPartialAssemblies` setting for it.
-This warning appears when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
+NETSDK1237 appears when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
```xml