From 24bfd0a9750d3b85849b925a7af1154322a9d066 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Mon, 5 Jun 2023 21:29:11 +0000 Subject: [PATCH 1/4] Document NETSDK1195 --- docs/core/tools/sdk-errors/index.md | 2 ++ docs/core/tools/sdk-errors/netsdk1195.md | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/core/tools/sdk-errors/netsdk1195.md diff --git a/docs/core/tools/sdk-errors/index.md b/docs/core/tools/sdk-errors/index.md index a4c3bb12eeffc..dce6c5b5745e7 100644 --- a/docs/core/tools/sdk-errors/index.md +++ b/docs/core/tools/sdk-errors/index.md @@ -154,6 +154,7 @@ f1_keywords: - NETSDK1190 - NETSDK1191 - NETSDK1192 +- NETSDK1195 --- # .NET SDK error list @@ -339,3 +340,4 @@ This is a complete list of the errors that you might get from the .NET SDK while |NETSDK1190|To use '{0}' in solution projects, you must set the environment variable '{1}' (to true). This will increase the time to complete the operation.| |NETSDK1191|A runtime identifier for the property '{0}' couldn't be inferred. Specify a rid explicitly.| |NETSDK1192|Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported.| +|[NETSDK1195](netsdk1195.md)|Trimming, or code compatibility analysis for trimming, single-file deployment, or ahead-of-time compilation is not supported for the target framework. For more information, see | diff --git a/docs/core/tools/sdk-errors/netsdk1195.md b/docs/core/tools/sdk-errors/netsdk1195.md new file mode 100644 index 0000000000000..0f8cbca55b54e --- /dev/null +++ b/docs/core/tools/sdk-errors/netsdk1195.md @@ -0,0 +1,17 @@ +--- +title: "NETSDK1195: Trimming, or code compatibility analysis for trimming, single-file deployment, or ahead-of-time compilation is not supported for the target framework." +description: How to resolve compatibility problems with features that rely on the ILLink pack. +ms.topic: error-reference +ms.date: 06/05/2023 +f1_keywords: +- NETSDK1195 +--- +# NETSDK1195: Trimming, or code compatibility analysis for trimming, single-file deployment, or ahead-of-time compilation is not supported for the target framework. + +NETSDK1195 indicates that you're using a feature of the SDK which is not available for the selected target framework. The following features depend on the ILLink pack, which is only available when targeting `netcoreapp3.0` and above: +- Trimming (via `PublishTrimmed` or `PublishAot`) +- Trim analysis (via `PublishTrimmed`, `PublishAot`, `IsTrimmable`, `IsAotCompatible`, or `EnableTrimAnalyzer`) +- Single-file analysis (via `PublishSingleFile` or `EnablSingleFileAnalyzer`) +- Ahead-of-time compilation analysis (via `PublishAot` or `EnableAotAnalyzer`) + +To resolve this error, either target a supported `TargetFramework`, or turn off the setting that requires the ILLink pack. From 1e602c2704a7a7fe3aed63aa996f3fe0530565e9 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Mon, 5 Jun 2023 21:40:24 +0000 Subject: [PATCH 2/4] Fix formatting --- docs/core/tools/sdk-errors/netsdk1195.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/core/tools/sdk-errors/netsdk1195.md b/docs/core/tools/sdk-errors/netsdk1195.md index 0f8cbca55b54e..1d9ab8bc8d103 100644 --- a/docs/core/tools/sdk-errors/netsdk1195.md +++ b/docs/core/tools/sdk-errors/netsdk1195.md @@ -9,6 +9,7 @@ f1_keywords: # NETSDK1195: Trimming, or code compatibility analysis for trimming, single-file deployment, or ahead-of-time compilation is not supported for the target framework. NETSDK1195 indicates that you're using a feature of the SDK which is not available for the selected target framework. The following features depend on the ILLink pack, which is only available when targeting `netcoreapp3.0` and above: + - Trimming (via `PublishTrimmed` or `PublishAot`) - Trim analysis (via `PublishTrimmed`, `PublishAot`, `IsTrimmable`, `IsAotCompatible`, or `EnableTrimAnalyzer`) - Single-file analysis (via `PublishSingleFile` or `EnablSingleFileAnalyzer`) From 9dbe91b61e59a1f0733794f22b6875a40cd67a61 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Mon, 5 Jun 2023 14:41:27 -0700 Subject: [PATCH 3/4] Apply suggestions from code review Co-authored-by: Tom Dykstra --- docs/core/tools/sdk-errors/index.md | 1 - docs/core/tools/sdk-errors/netsdk1195.md | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/core/tools/sdk-errors/index.md b/docs/core/tools/sdk-errors/index.md index dce6c5b5745e7..4f8706d18dfa2 100644 --- a/docs/core/tools/sdk-errors/index.md +++ b/docs/core/tools/sdk-errors/index.md @@ -154,7 +154,6 @@ f1_keywords: - NETSDK1190 - NETSDK1191 - NETSDK1192 -- NETSDK1195 --- # .NET SDK error list diff --git a/docs/core/tools/sdk-errors/netsdk1195.md b/docs/core/tools/sdk-errors/netsdk1195.md index 1d9ab8bc8d103..0d07cdbb8bd56 100644 --- a/docs/core/tools/sdk-errors/netsdk1195.md +++ b/docs/core/tools/sdk-errors/netsdk1195.md @@ -12,7 +12,7 @@ NETSDK1195 indicates that you're using a feature of the SDK which is not availab - Trimming (via `PublishTrimmed` or `PublishAot`) - Trim analysis (via `PublishTrimmed`, `PublishAot`, `IsTrimmable`, `IsAotCompatible`, or `EnableTrimAnalyzer`) -- Single-file analysis (via `PublishSingleFile` or `EnablSingleFileAnalyzer`) +- Single-file analysis (via `PublishSingleFile` or `EnableSingleFileAnalyzer`) - Ahead-of-time compilation analysis (via `PublishAot` or `EnableAotAnalyzer`) To resolve this error, either target a supported `TargetFramework`, or turn off the setting that requires the ILLink pack. From 4e9be4f1e93339aab1f2718e329a91026e150229 Mon Sep 17 00:00:00 2001 From: Sven Boemer Date: Mon, 5 Jun 2023 21:42:53 +0000 Subject: [PATCH 4/4] Add to toc.yml --- docs/navigate/tools-diagnostics/toc.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index aab443a83b1c1..f894a3f7c0425 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -71,6 +71,8 @@ items: href: ../../core/tools/sdk-errors/netsdk1174.md - name: NETSDK1182 href: ../../core/tools/sdk-errors/netsdk1182.md + - name: NETSDK1195 + href: ../../core/tools/sdk-errors/netsdk1195.md - name: .NET CLI items: - name: Overview