| name | converting-to-sdk-style |
| description | Converts legacy non-SDK-style .NET project files (.csproj, .vbproj, .fsproj) to modern SDK-style format while preserving target frameworks, dependencies, and build behavior. Use when converting old-format .NET projects, migrating from packages.config to PackageReference, or modernizing project files. Also triggers for "convert to SDK style", "modernize csproj", "update project format", "legacy project migration", and "SDK-style conversion".
|
| metadata | {"discovery":"lazy","traits":".NET|CSharp|VisualBasic|DotNetCore"} |
SDK Style Conversion
Overview
Guide the step-by-step conversion of legacy (non SDK-style) project files to SDK-style while preserving existing target frameworks, behavior, and build output. This is a structural-only conversion — no target framework changes or functional refactors.
Hard Constraints
- Do not change, add, remove, or upgrade TargetFramework/TargetFrameworks values — this conversion is format-only, not an upgrade
- Do not introduce new package versions unrelated to conversion — package drift causes subtle runtime issues
- Only convert the project format using the provided tools and fix build issues directly caused by the conversion
Available Tools
- Project ordering tool: Use a tool capability to obtain the topological (dependency) order. Do not hand-compute and stop if unsuccessful
- SDK style conversion tool: Use the dedicated conversion tool for each project. Do not manually rewrite XML and stop if unsuccessful
Workflow
Execution
Use appropriate tools (not direct file reads) to gather project information. For each project in topological order, convert one project at a time — never invoke the conversion tool for multiple projects in parallel (the underlying MSBuild engine uses shared global state that is not safe for concurrent access):