From e19676b683b513522b91c048f03ed511139a9653 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 28 May 2026 05:04:43 +0000 Subject: [PATCH] chore: publish from staged --- instructions/dotnet-framework.instructions.md | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/instructions/dotnet-framework.instructions.md b/instructions/dotnet-framework.instructions.md index 9b796f61..a4942adb 100644 --- a/instructions/dotnet-framework.instructions.md +++ b/instructions/dotnet-framework.instructions.md @@ -10,20 +10,25 @@ applyTo: '**/*.csproj, **/*.cs' ## Project File Management -### Non-SDK Style Project Structure -.NET Framework projects use the legacy project format, which differs significantly from modern SDK-style projects: +### Legacy and SDK-Style Project Structure +Many .NET Framework projects use the legacy non-SDK project format, which differs significantly from modern SDK-style projects. However, SDK-style project files can also target .NET Framework, such as `net48` or `net472`. Check the `.csproj` format before applying project-file guidance: -- **Explicit File Inclusion**: All new source files **MUST** be explicitly added to the project file (`.csproj`) using a `` element - - .NET Framework projects do not automatically include files in the directory like SDK-style projects +- **Legacy non-SDK projects**: All new source files **MUST** be explicitly added to the project file (`.csproj`) using a `` element + - Legacy non-SDK projects do not automatically include files in the directory like SDK-style projects - Example: `` -- **No Implicit Imports**: Unlike SDK-style projects, .NET Framework projects do not automatically import common namespaces or assemblies +- **SDK-style projects**: If the project file has an `Sdk` attribute, use SDK-style conventions even when it targets .NET Framework + - Example: `` + - Uses `` instead of `` + - Example: `net48` + +- **No Implicit Imports in legacy projects**: Unlike SDK-style projects, legacy non-SDK projects do not automatically import common namespaces or assemblies -- **Build Configuration**: Contains explicit `` sections for Debug/Release configurations +- **Build Configuration in legacy projects**: Contains explicit `` sections for Debug/Release configurations -- **Output Paths**: Explicit `` and `` definitions +- **Output Paths in legacy projects**: Explicit `` and `` definitions -- **Target Framework**: Uses `` instead of `` +- **Target Framework in legacy projects**: Uses `` instead of `` - Example: `v4.7.2` ## NuGet Package Management