Skip to content

Commit 89439a7

Browse files
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>
1 parent 5405ef6 commit 89439a7

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

docs/core/tools/sdk-errors/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,3 +374,4 @@ This list is a complete list of the errors that you might get from the .NET SDK
374374
|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:<br>`<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>`|
375375
|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:<br>`<IsTrimmable Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net6.0'))">true</IsTrimmable>`|
376376
|NETSDK1213|Targeting .NET 8.0 or higher in Visual Studio 2022 17.7 is not supported.|
377+
|[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.|
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: "NETSDK1237: Assembly listed in PublishReadyToRunPartialAssemblies but compiled into a composite image"
3+
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.
4+
ms.topic: error-reference
5+
ms.date: 04/13/2026
6+
f1_keywords:
7+
- NETSDK1237
8+
ai-usage: ai-generated
9+
---
10+
# NETSDK1237: Assembly listed in PublishReadyToRunPartialAssemblies but compiled into a composite image
11+
12+
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.
13+
14+
This situation occurs when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:
15+
16+
```xml
17+
<Project Sdk="Microsoft.NET.Sdk">
18+
<PropertyGroup>
19+
<PublishReadyToRun>true</PublishReadyToRun>
20+
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
21+
</PropertyGroup>
22+
<ItemGroup>
23+
<!-- NETSDK1237 is emitted for each assembly listed here -->
24+
<PublishReadyToRunPartialAssemblies Include="SomeAssembly" />
25+
</ItemGroup>
26+
</Project>
27+
```
28+
29+
To resolve this warning, choose one of the following options:
30+
31+
- Remove the assemblies from `PublishReadyToRunPartialAssemblies` if you want them compiled fully into the composite image.
32+
- Set `PublishReadyToRunComposite` to `false` if you want to compile assemblies partially and separately instead of into a composite image.

docs/navigate/tools-diagnostics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,8 @@ items:
9191
href: ../../core/tools/sdk-errors/netsdk1202.md
9292
- name: NETSDK1206
9393
href: ../../core/tools/sdk-errors/netsdk1206.md
94+
- name: NETSDK1237
95+
href: ../../core/tools/sdk-errors/netsdk1237.md
9496
- name: BuildCheck rules
9597
items:
9698
- name: Index of rules

0 commit comments

Comments
 (0)