Skip to content

Remove legacy WinRT.SourceGenerator and rename WinRT.SourceGenerator2#2354

Merged
Sergio0694 merged 7 commits intostaging/3.0from
user/sergiopedri/remove-legacy-generator
Mar 23, 2026
Merged

Remove legacy WinRT.SourceGenerator and rename WinRT.SourceGenerator2#2354
Sergio0694 merged 7 commits intostaging/3.0from
user/sergiopedri/remove-legacy-generator

Conversation

@Sergio0694
Copy link
Member

Summary

Remove the legacy WinRT.SourceGenerator authoring project, its associated test project, and rename WinRT.SourceGenerator2 to WinRT.SourceGenerator for back-compat.

Changes

  • Remove legacy source generator projects: delete the WinRT.SourceGenerator shared project (sources, analyzers, code fixers, diagnostics, resources, props, projitems), Roslyn-specific csproj wrappers (Roslyn4080/Roslyn4120), and analyzer release notes.
  • Remove test project: delete SourceGeneratorTest and its test helpers (DiagnosticAnalyzerTests, RuntimeClassCastCodeFixerTests, etc.).
  • Update solution file: remove deprecated project entries from src/cswinrt.slnx.
  • Rename assembly: change WinRT.SourceGenerator2 assembly name to WinRT.SourceGenerator in its csproj.
  • Update build infrastructure: update Azure Pipeline templates (build steps, signing, NuGet packaging) and build.cmd to reference the new WinRT.SourceGenerator assembly name.

Remove several project entries from src/cswinrt.slnx: the Authoring source-generator variants (WinRT.SourceGenerator.Roslyn4080.csproj, WinRT.SourceGenerator.Roslyn4120.csproj, WinRT.SourceGenerator.shproj) and the Tests/SourceGeneratorTest.csproj. This cleans up the solution by removing deprecated/unused source-generator project references and the associated test project so the solution matches current build targets.
Delete the WinRT.SourceGenerator authoring project (sources, analyzers, codefixers, diagnostics, resources, props and projitems) along with Roslyn-specific csproj wrappers (Roslyn4080/Roslyn4120) and related analyzer release notes. Also remove the SourceGeneratorTest test project and its test helpers. Cleans up the repository by removing the legacy/source-generator implementation and its test coverage.
Rename the SourceGenerator assembly from WinRT.SourceGenerator2 to WinRT.SourceGenerator and update build references accordingly. The csproj AssemblyName was changed for back-compat, and build scripts and Azure Pipeline templates were updated (staging, signing, and NuGet pack properties) to reference WinRT.SourceGenerator(.dll/.pdb) so packaging, signing, and build tasks work with the new assembly name.
@Sergio0694 Sergio0694 requested a review from manodasanW March 19, 2026 22:32
Sergio0694 and others added 4 commits March 19, 2026 16:03
Mark CsWinMD project with Build Project="false" in the solution file, as it references the removed SourceGenerator type and is not currently supported.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment out the <Exec> call that invokes the CsWinMD tool in nuget/Microsoft.Windows.CsWinMD.targets and add a TODO to re-enable it when support is restored. The MakeDir for the output path remains. This prevents automatic execution of the tool until the underlying issue is addressed.
@Sergio0694 Sergio0694 enabled auto-merge (squash) March 21, 2026 21:44
@Sergio0694 Sergio0694 merged commit 5bbfef6 into staging/3.0 Mar 23, 2026
11 checks passed
@manodasanW manodasanW deleted the user/sergiopedri/remove-legacy-generator branch March 23, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants