Skip to content

Remove leftover cswinmd tool and related artifacts#2408

Merged
Sergio0694 merged 2 commits into
staging/3.0from
user/sergiopedri/delete-cswinmd
Apr 30, 2026
Merged

Remove leftover cswinmd tool and related artifacts#2408
Sergio0694 merged 2 commits into
staging/3.0from
user/sergiopedri/delete-cswinmd

Conversation

@Sergio0694

Copy link
Copy Markdown
Member

Summary

Remove the legacy cswinmd authoring tool and its associated test component, plus all related leftover infrastructure (NuGet spec, MSBuild targets, CI steps, build scripts, solution entries). The WinMD generation responsibilities are now fully owned by the new cswinrtwinmdgen tool (src/WinRT.WinMD.Generator/). The remaining authoring WinMD targets file is renamed for naming consistency with the rest of the CsWinRT 3.0 targets.

Motivation

With CsWinRT 3.0, WinMD generation has moved entirely into the new cswinrtwinmdgen.exe post-build tool, which is consistent with the other 3.0 build tools (cswinrtimplgen, cswinrtprojectiongen, cswinrtinteropgen). The old cswinmd project, its standalone NuGet package, and the C++ CSWinMDComponent test project are no longer used and only added clutter to the repo, the solution, and the CI pipeline. Renaming Microsoft.Windows.CsWinMD.Generator.targets to Microsoft.Windows.CsWinRT.Authoring.WinMD.targets aligns its name with the existing Microsoft.Windows.CsWinRT.Authoring.*.targets family.

Changes

  • src/Authoring/cswinmd/: deleted the legacy CsWinMD tool project (CsWinMD.csproj, Program.cs).
  • src/Tests/CSWinMDComponent/: deleted the C++ test component that depended on the old tool (vcxproj, headers, sources, .def, props, packages.config).
  • nuget/Microsoft.Windows.CsWinMD.nuspec and nuget/Microsoft.Windows.CsWinMD.targets: removed; the standalone CsWinMD NuGet package is no longer produced.
  • nuget/Microsoft.Windows.CsWinMD.Generator.targetsnuget/Microsoft.Windows.CsWinRT.Authoring.WinMD.targets: renamed for naming consistency with other authoring targets.
  • nuget/Microsoft.Windows.CsWinRT.targets: updated the import to reference the renamed targets file.
  • src/build.cmd: removed the cswinmd_outpath variable and the second nuget pack invocation that built the CsWinMD package.
  • src/cswinrt.slnx: removed the CsWinMD and CSWinMDComponent solution entries; tidied up the Files/src/ folder paths to be solution-relative.
  • build/AzurePipelineTemplates/: removed CsWinMD build/stage/publish steps from CsWinRT-Build-Steps.yml, CsWinRT-BuildAndTest-Stage-OneBranch.yml, CsWinRT-PublishToNuGet-Steps.yml, and the PublishCsWinMD variable from CsWinRT-Variables.yml.
  • docs/structure.md and .github/copilot-instructions.md: updated references to the old cswinmd tool and the renamed targets file.
  • .github/skills/update-copilot-instructions/SKILL.md: minor doc update to match.

@Sergio0694
Sergio0694 requested a review from manodasanW April 26, 2026 04:18
@Sergio0694 Sergio0694 added code cleanup Code cleanup and refactoring tooling CsWinRT 3.0 labels Apr 26, 2026
@Sergio0694
Sergio0694 enabled auto-merge (squash) April 26, 2026 17:34
@Sergio0694
Sergio0694 force-pushed the user/sergiopedri/delete-cswinmd branch from ccdc598 to 8df2138 Compare April 30, 2026 12:30
Remove the legacy CsWinMD authoring tool and its tests, and update build/CI and docs to use the new WinMD authoring targets. Deleted CsWinMD project, binaries, NuGet spec/targets and test CSWinMDComponent files; renamed Microsoft.Windows.CsWinMD.Generator.targets to Microsoft.Windows.CsWinRT.Authoring.WinMD.targets and updated Microsoft.Windows.CsWinRT.targets import. Cleaned up Azure pipeline templates and build scripts to stop staging/packing CsWinMD, removed the PublishCsWinMD variable, and updated documentation and solution entries to reflect the change.
@Sergio0694
Sergio0694 force-pushed the user/sergiopedri/delete-cswinmd branch from 8df2138 to 77a0279 Compare April 30, 2026 14:18
* Add Benchmarks and Hosting folders to solution

Reorganize cswinrt.slnx by introducing /Benchmarks/ and /Hosting/ folders. Move Benchmarks.csproj into /Benchmarks/ and add its BuildDependency entries and platform mappings. Relocate TestWinRT/BenchmarkComponent and Tests/ObjectLifetimeTests entries (with platform/build flags) to match the new folder layout. Move Authoring/WinRT.Host.Shim and WinRT.Host projects into /Hosting/ and adjust WinRT.SourceGenerator2 placement. Preserve existing platform and Build attributes while updating the solution ordering.

* Fix NuGet folder casing in solution

Update src/cswinrt.slnx to change the Folder Name from "/Nuget/" to "/NuGet/" for consistent casing. This avoids potential issues on case-sensitive filesystems and keeps the solution aligned with standard NuGet naming.
@Sergio0694
Sergio0694 force-pushed the user/sergiopedri/delete-cswinmd branch from 77a0279 to d02e9ad Compare April 30, 2026 17:50
@Sergio0694
Sergio0694 merged commit 602fbc5 into staging/3.0 Apr 30, 2026
11 checks passed
@Sergio0694
Sergio0694 deleted the user/sergiopedri/delete-cswinmd branch April 30, 2026 21:01
Sergio0694 added a commit that referenced this pull request Jul 1, 2026
The CsWinMD tool and its CSWinMDComponent test were removed in #2408, but the projection generator port (#2440) accidentally re-added the orphaned CSWinMDComponent.vcxproj.filters file. It is the only remaining file in the directory, is not part of any solution, and is referenced by nothing. Remove it (and the now-empty directory).

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants