Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/core/tools/sdk-errors/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:<br>`<EnableSingleFileAnalyzer Condition="$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', '{0}'))">true</EnableSingleFileAnalyzer>`|
|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>`|
|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.|
32 changes: 32 additions & 0 deletions docs/core/tools/sdk-errors/netsdk1237.md
Original file line number Diff line number Diff line change
@@ -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 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.

NETSDK1237 appears when you set both `PublishReadyToRunComposite` to `true` and include assemblies in `PublishReadyToRunPartialAssemblies` in your project file:

```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<PublishReadyToRun>true</PublishReadyToRun>
<PublishReadyToRunComposite>true</PublishReadyToRunComposite>
</PropertyGroup>
<ItemGroup>
<!-- NETSDK1237 is emitted for each assembly listed here -->
<PublishReadyToRunPartialAssemblies Include="SomeAssembly" />
</ItemGroup>
</Project>
```

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.
2 changes: 2 additions & 0 deletions docs/navigate/tools-diagnostics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading