You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
Copy file name to clipboardExpand all lines: docs/core/deploying/single-file/warnings/overview.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,3 +26,4 @@ SingleFile rules for .NET.
26
26
|[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|
27
27
|[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|
28
28
|[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.|
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.
Copy file name to clipboardExpand all lines: docs/fundamentals/code-analysis/quality-rules/index.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -335,6 +335,7 @@ The following table lists code quality analysis rules.
335
335
> |[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. |
336
336
> |[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|
337
337
> |[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. |
0 commit comments