Consolidate interop generator docs into skill and cswinrtgen/#2361
Merged
Sergio0694 merged 2 commits intostaging/3.0from Mar 22, 2026
Merged
Consolidate interop generator docs into skill and cswinrtgen/#2361Sergio0694 merged 2 commits intostaging/3.0from
Sergio0694 merged 2 commits intostaging/3.0from
Conversation
Move the name mangling scheme specification from docs/winrt-interop-dll-spec.md to docs/cswinrtgen/name-mangling-scheme.md, to consolidate all interop generator design documents under docs/cswinrtgen/. The Overview and Build Infrastructure sections that were in the old spec doc are being integrated into the interop generator skill in a separate commit. The old doc is removed entirely. The name mangling spec content is preserved as-is (verified accurate against the InteropUtf8NameFactory implementation), with a new title and introductory paragraph reflecting that this document now focuses solely on the name mangling scheme. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integrate the Overview and Build Infrastructure content from the now-removed docs/winrt-interop-dll-spec.md into the interop generator skill (.github/skills/interop-generator/SKILL.md): - Add performance/security/usability benefits to Overview - Add new 'Accessing interop APIs' paragraph documenting the [UnsafeAccessor]/[UnsafeAccessorType] pattern - Add new 'Build infrastructure' section with .NET SDK task/target links, and a 'Version compatibility' subsection documenting the version matching logic and 'implementation details only' APIs - Reference docs/cswinrtgen/name-mangling-scheme.md from the naming conventions section and the control flow cross-references Update the update-interop-generator-instructions skill to include docs/cswinrtgen/name-mangling-scheme.md in the list of design documents to verify and update (step 13). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
5268bf2 to
9f2b21f
Compare
manodasanW
reviewed
Mar 22, 2026
|
|
||
| `cswinrtinteropgen` must be versioned with the `WinRT.Runtime.dll` assembly it was compiled for. Not doing so will result in undefined behavior (e.g. failures to run the tool, or runtime crashes). To ensure these versions always match, the .NET SDK selects the right version of `cswinrtinteropgen` after all reference assemblies are resolved: | ||
|
|
||
| - If a project **does not** reference CsWinRT, then `cswinrtinteropgen` is loaded from the Windows SDK projections targeting pack. |
Member
There was a problem hiding this comment.
This is a bit outdated with the current plan - sdk projection package only having the reference assembly and not the others.
manodasanW
approved these changes
Mar 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidate the interop generator documentation by integrating the Overview and Build Infrastructure sections from
docs/winrt-interop-dll-spec.mdinto the interop generator skill, and moving the remaining name mangling scheme specification intodocs/cswinrtgen/.Motivation
The
docs/winrt-interop-dll-spec.mdfile was written before the interop generator skill (SKILL.md) existed and contained information that was partially redundant. This PR consolidates all interop generator context into the skill (where it's most useful for Copilot), moves the name mangling scheme to live alongside the other design docs indocs/cswinrtgen/, and removes the now-superseded spec document.Changes
docs/winrt-interop-dll-spec.md→docs/cswinrtgen/name-mangling-scheme.md: Moved and refocused — now contains only the name mangling scheme specification (verified accurate against theInteropUtf8NameFactoryimplementation). Updated title and intro accordingly..github/skills/interop-generator/SKILL.md: Integrated non-redundant info from the old spec's Overview and Build Infrastructure sections:Accessing interop APIsparagraph documenting the[UnsafeAccessor]/[UnsafeAccessorType]patternBuild infrastructuresection with .NET SDK task/target links and aVersion compatibilitysubsectionname-mangling-scheme.mddoc.github/skills/update-interop-generator-instructions/SKILL.md: Addeddocs/cswinrtgen/name-mangling-scheme.mdto the list of design documents to verify and update (step 13)