From b976a6a2162c2d465a1813e92e778701c040c96d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Strehovsk=C3=BD?= Date: Thu, 28 Nov 2024 22:39:52 +0100 Subject: [PATCH] Document new trimming warnings --- docs/core/deploying/native-aot/warnings/il3057.md | 14 ++++++++++++++ docs/core/deploying/single-file/warnings/il3005.md | 14 ++++++++++++++ .../deploying/single-file/warnings/overview.md | 1 + .../deploying/trimming/trim-warnings/il2123.md | 14 ++++++++++++++ .../code-analysis/quality-rules/index.md | 1 + docs/navigate/devops-testing/toc.yml | 4 ++++ docs/navigate/tools-diagnostics/toc.yml | 2 ++ 7 files changed, 50 insertions(+) create mode 100644 docs/core/deploying/native-aot/warnings/il3057.md create mode 100644 docs/core/deploying/single-file/warnings/il3005.md create mode 100644 docs/core/deploying/trimming/trim-warnings/il2123.md diff --git a/docs/core/deploying/native-aot/warnings/il3057.md b/docs/core/deploying/native-aot/warnings/il3057.md new file mode 100644 index 0000000000000..a9f88c78b0690 --- /dev/null +++ b/docs/core/deploying/native-aot/warnings/il3057.md @@ -0,0 +1,14 @@ +--- +title: "IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point" +description: "Learn about warning IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point" +ms.date: 11/27/2024 +ms.author: michals +author: MichalStrehovsky +f1_keywords: + - "IL3057" +--- +# IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point + +## Cause + + on entry points is not allowed since the method will be called from code that is not subject to static analysis. Entry points include the `Main` method or methods annotated with with `EntryPoint` property specified. diff --git a/docs/core/deploying/single-file/warnings/il3005.md b/docs/core/deploying/single-file/warnings/il3005.md new file mode 100644 index 0000000000000..56cc1def1990e --- /dev/null +++ b/docs/core/deploying/single-file/warnings/il3005.md @@ -0,0 +1,14 @@ +--- +title: "IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point" +description: "Learn about warning IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point" +ms.date: 11/27/2024 +ms.author: michals +author: MichalStrehovsky +f1_keywords: + - "IL3005" +--- +# IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point + +## Cause + + on entry points is not allowed since the method will be called from code that is not subject to static analysis. Entry points include the `Main` method or methods annotated with with `EntryPoint` property specified. diff --git a/docs/core/deploying/single-file/warnings/overview.md b/docs/core/deploying/single-file/warnings/overview.md index 3007b6ad525e1..7dd70a1678448 100644 --- a/docs/core/deploying/single-file/warnings/overview.md +++ b/docs/core/deploying/single-file/warnings/overview.md @@ -26,3 +26,4 @@ SingleFile rules for .NET. |[IL3001 Avoid accessing Assembly file path when publishing as a single file](il3001.md)|Avoid accessing Assembly file path when publishing as a single file| |[IL3002 Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file](il3002.md)|Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file| |[IL3003 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.](il3003.md)|'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.| +|[IL3005 `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point.](il3005.md)|`RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point.| diff --git a/docs/core/deploying/trimming/trim-warnings/il2123.md b/docs/core/deploying/trimming/trim-warnings/il2123.md new file mode 100644 index 0000000000000..707f1b4b1086f --- /dev/null +++ b/docs/core/deploying/trimming/trim-warnings/il2123.md @@ -0,0 +1,14 @@ +--- +title: "IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point" +description: "Learn about warning IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point" +ms.date: 11/27/2024 +ms.author: michals +author: MichalStrehovsky +f1_keywords: + - "IL2123" +--- +# IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point + +## Cause + + on entry points is not allowed since the method will be called from code that is not subject to static analysis. Entry points include the `Main` method or methods annotated with with `EntryPoint` property specified. diff --git a/docs/fundamentals/code-analysis/quality-rules/index.md b/docs/fundamentals/code-analysis/quality-rules/index.md index 63d99e07ea866..67a16fb26a64c 100644 --- a/docs/fundamentals/code-analysis/quality-rules/index.md +++ b/docs/fundamentals/code-analysis/quality-rules/index.md @@ -335,6 +335,7 @@ The following table lists code quality analysis rules. > | [IL3001: Avoid accessing Assembly file path when publishing as a single-file](../../../core/deploying/single-file/warnings/il3001.md) | Avoid accessing Assembly file path when publishing as a single file. | > | [IL3002: Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file](../../../core/deploying/single-file/warnings/il3002.md) | Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file| > | [IL3003: 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.](../../../core/deploying/single-file/warnings/il3003.md) | 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.| +> | [IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point.](../../../core/deploying/single-file/warnings/il3005.md)|`RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point. | ## Legend diff --git a/docs/navigate/devops-testing/toc.yml b/docs/navigate/devops-testing/toc.yml index 4ee918edae68e..6664bc6e8e0e3 100644 --- a/docs/navigate/devops-testing/toc.yml +++ b/docs/navigate/devops-testing/toc.yml @@ -503,6 +503,8 @@ items: href: ../../core/deploying/trimming/trim-warnings/il2117.md - name: IL2122 href: ../../core/deploying/trimming/trim-warnings/il2122.md + - name: IL2123 + href: ../../core/deploying/trimming/trim-warnings/il2123.md - name: Native AOT deployment model items: - name: Overview @@ -539,6 +541,8 @@ items: href: ../../core/deploying/native-aot/warnings/il3055.md - name: IL3056 href: ../../core/deploying/native-aot/warnings/il3056.md + - name: IL3057 + href: ../../core/deploying/native-aot/warnings/il3057.md - name: iOS-like platforms items: - name: Overview diff --git a/docs/navigate/tools-diagnostics/toc.yml b/docs/navigate/tools-diagnostics/toc.yml index b94ca12ff0e71..91f27ebffda75 100644 --- a/docs/navigate/tools-diagnostics/toc.yml +++ b/docs/navigate/tools-diagnostics/toc.yml @@ -1100,6 +1100,8 @@ items: href: ../../core/deploying/single-file/warnings/il3002.md - name: IL3003 href: ../../core/deploying/single-file/warnings/il3003.md + - name: IL3005 + href: ../../core/deploying/single-file/warnings/il3005.md - name: Reliability rules items: - name: Overview