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..83ac55a63588e --- /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 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 + + + 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