MSBuild Modernizer

•
1.2k
•

Migrates legacy .NET project files to the modern SDK-style format with minimal XML and improved dependency management.

The MSBuild Modernizer skill automates the complex process of upgrading legacy MSBuild project files (.csproj, .vbproj) into the streamlined SDK-style format used by modern .NET. It identifies legacy indicators like ToolsVersion and explicit file lists, then systematically refactors them by converting packages.config to PackageReference, moving AssemblyInfo.cs metadata into the project file, and removing redundant boilerplate. This transformation significantly reduces project file size, simplifies version control diffs, and prepares legacy applications for migration to modern .NET versions like .NET 8 or .NET 9 while enabling features like nullable reference types and implicit usings.

Key Features

01Migrates packages.config to modern PackageReference items
02Enables modern C# features like Nullable and ImplicitUsings
03Replaces explicit <Compile Include> lists with implicit globbing
04Converts legacy XML project files to clean SDK-style format
05Consolidates AssemblyInfo.cs attributes into .csproj properties
061,215 GitHub stars

Use Cases

01Preparing legacy C# applications for migration to .NET 6/8/9
02Consolidating shared project settings into Directory.Build.props
03Refactoring a large .NET Framework 4.8 solution for better maintainability