What problem does it solve?
.NET projects often check in auto-generated .Designer.cs files behind .resx resources, creating noisy diffs, merge conflicts, and stale generated code. This Skill migrates a project to the Microsoft.CodeAnalysis.ResxSourceGenerator package so resource accessors are generated at build time instead of being committed to source control.
Core Features & Use Cases
- Package Setup: Adds the Microsoft.CodeAnalysis.ResxSourceGenerator PackageReference while respecting central package management and configured NuGet feeds.
- Safe Designer Removal: Identifies and deletes generated .Designer.cs files only after verifying they are string-only resource accessors, preserving WinForms designer files and non-string resources.
- MSBuild Metadata Migration: Rewrites EmbeddedResource items by removing Generator, LastGenOutput, and CustomTool metadata, converting CustomToolNamespace to ClassName, and setting GenerateSource=false where generation is unsafe.
- Use Case: A repository with dozens of Strings.Designer.cs files causing constant merge conflicts can be migrated in one pass, with the build validated and resource access verified afterward.
Quick Start
Migrate the project at src/MyApp/MyApp.csproj to use the resx source generator instead of checked-in designer files.