Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document new trimming warnings #43796

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
14 changes: 14 additions & 0 deletions docs/core/deploying/native-aot/warnings/il3057.md
Original file line number Diff line number Diff line change
@@ -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

<xref:System.Diagnostics.CodeAnalysis.RequiresDynamicCodeAttribute> 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 <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute> with `EntryPoint` property specified.
14 changes: 14 additions & 0 deletions docs/core/deploying/single-file/warnings/il3005.md
Original file line number Diff line number Diff line change
@@ -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

<xref:System.Diagnostics.CodeAnalysis.RequiresAssemblyFilesAttribute> 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 <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute> with `EntryPoint` property specified.
1 change: 1 addition & 0 deletions docs/core/deploying/single-file/warnings/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.|
14 changes: 14 additions & 0 deletions docs/core/deploying/trimming/trim-warnings/il2123.md
Original file line number Diff line number Diff line change
@@ -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

<xref:System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute> 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 <xref:System.Runtime.InteropServices.UnmanagedCallersOnlyAttribute> with `EntryPoint` property specified.
1 change: 1 addition & 0 deletions docs/fundamentals/code-analysis/quality-rules/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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