Skip to content

Commit e5755b4

Browse files
Document new trimming warnings (#43796)
1 parent 0c7a41e commit e5755b4

File tree

7 files changed

+50
-0
lines changed

7 files changed

+50
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point"
3+
description: "Learn about warning IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point"
4+
ms.date: 11/27/2024
5+
ms.author: michals
6+
author: MichalStrehovsky
7+
f1_keywords:
8+
- "IL3057"
9+
---
10+
# IL3057: `RequiresDynamicCodeAttribute` cannot be placed directly on application entry point
11+
12+
## Cause
13+
14+
<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.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point"
3+
description: "Learn about warning IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point"
4+
ms.date: 11/27/2024
5+
ms.author: michals
6+
author: MichalStrehovsky
7+
f1_keywords:
8+
- "IL3005"
9+
---
10+
# IL3005: `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point
11+
12+
## Cause
13+
14+
<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.

docs/core/deploying/single-file/warnings/overview.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ SingleFile rules for .NET.
2626
|[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|
2727
|[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|
2828
|[IL3003 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.](il3003.md)|'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides.|
29+
|[IL3005 `RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point.](il3005.md)|`RequiresAssemblyFilesAttribute` cannot be placed directly on application entry point.|
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
title: "IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point"
3+
description: "Learn about warning IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point"
4+
ms.date: 11/27/2024
5+
ms.author: michals
6+
author: MichalStrehovsky
7+
f1_keywords:
8+
- "IL2123"
9+
---
10+
# IL2123: `RequiresUnreferencedCodeAttribute` cannot be placed directly on application entry point
11+
12+
## Cause
13+
14+
<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.

docs/fundamentals/code-analysis/quality-rules/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ The following table lists code quality analysis rules.
335335
> | [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. |
336336
> | [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|
337337
> | [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.|
338+
> | [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. |
338339
339340
## Legend
340341

docs/navigate/devops-testing/toc.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,8 @@ items:
505505
href: ../../core/deploying/trimming/trim-warnings/il2117.md
506506
- name: IL2122
507507
href: ../../core/deploying/trimming/trim-warnings/il2122.md
508+
- name: IL2123
509+
href: ../../core/deploying/trimming/trim-warnings/il2123.md
508510
- name: Native AOT deployment model
509511
items:
510512
- name: Overview
@@ -541,6 +543,8 @@ items:
541543
href: ../../core/deploying/native-aot/warnings/il3055.md
542544
- name: IL3056
543545
href: ../../core/deploying/native-aot/warnings/il3056.md
546+
- name: IL3057
547+
href: ../../core/deploying/native-aot/warnings/il3057.md
544548
- name: iOS-like platforms
545549
items:
546550
- name: Overview

docs/navigate/tools-diagnostics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,8 @@ items:
11001100
href: ../../core/deploying/single-file/warnings/il3002.md
11011101
- name: IL3003
11021102
href: ../../core/deploying/single-file/warnings/il3003.md
1103+
- name: IL3005
1104+
href: ../../core/deploying/single-file/warnings/il3005.md
11031105
- name: Reliability rules
11041106
items:
11051107
- name: Overview

0 commit comments

Comments
 (0)