
msbuild-modernization
Guide for modernizing and migrating MSBuild project files to SDK-style format
by dotnetFree
Description
MSBuild Modernization is an agent skill that guides the move of MSBuild project files from the legacy format to SDK style. It covers legacy .csproj and .vbproj files with verbose XML, the kind that list every source file and import the old C# targets. The skill first shows how to tell the two formats apart. Legacy projects show signs such as an import of Microsoft.CSharp.targets from MSBuildToolsPath, explicit Compile includes for every .cs file, a ToolsVersion attribute on the Project element, a packages.config file, or a Properties folder with an AssemblyInfo.cs holding assembly attributes. An SDK-style project has a root element with the Microsoft.NET.Sdk attribute, minimal content that can be as short as 10 to 15 lines, no explicit file includes because files are picked up by globbing, and PackageReference items in place of packages.config. With that picture in hand, the agent can plan the conversion step by step. The skill is published in the dotnet/skills collection on skills.sh, with about 4.8K installs.…
Highlights
- Converts legacy .csproj and .vbproj files to SDK style
- Shows how to spot legacy and SDK-style projects
- Replaces explicit file lists with implicit globbing
- Moves packages.config entries to PackageReference items
- Plans the conversion step by step
Ratings & Reviews
No ratings yet
Be the first to rate msbuild-modernization.
People also visit

msbuild-antipatterns
DO NOT INVOKE when the primary request explicitly asks to convert, migrate

migrate-dotnet8-to-dotnet9
Migrate a .NET 8 project to .NET 9 and resolve all breaking changes

migrate-dotnet9-to-dotnet10
Migrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes
msbuild-modernization FAQ
What is the MSBuild Modernization skill?
It is an instruction set for an AI coding agent that guides a legacy-to-SDK-style migration of .csproj and .vbproj files.
How do I install it?
Run npx skills add https://github.com/dotnet/skills --skill msbuild-modernization in your project.
What does a legacy project look like?
It imports the old C# targets from MSBuildToolsPath, lists every source file explicitly, sets ToolsVersion and may use a packages.config file.
What does an SDK-style project look like?
Its root Project element uses the Microsoft.NET.Sdk attribute, it is short, it has no explicit file includes, and it uses PackageReference items.
Does the skill pass its security audits?
Yes. On skills.sh the audits show Gen Agent Trust Hub Pass, Socket Pass and Snyk Pass.
What are the best msbuild-modernization alternatives?
Popular alternatives to msbuild-modernization include msbuild-antipatterns, property-patterns and migrate-dotnet10-to-dotnet11. See all msbuild-modernization alternatives





