-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add documentation for RID-specific and AOT .NET tools #49874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: meaghanlewis <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for RID-specific and AOT-enabled .NET tools, a feature introduced in .NET SDK 10.0.100-preview.6. The documentation enables tool authors to package and distribute platform-specific, native, and trimmed .NET tools.
- New article
rid-specific-tools.mddocumenting the complete workflow for creating RID-specific tools - Cross-reference links added to existing tool documentation
- TOC entry added for the new article
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| docs/core/tools/rid-specific-tools.md | New comprehensive guide covering RID-specific tool configuration, packaging workflows for AOT and non-AOT scenarios, package structure, and complete examples |
| docs/core/tools/global-tools.md | Added cross-reference link to new RID-specific tools article |
| docs/core/tools/global-tools-how-to-create.md | Added "See also" section with link to RID-specific tools article |
| docs/navigate/tools-diagnostics/toc.yml | Added TOC entry for new RID-specific tools article |
| <TargetFramework>net9.0</TargetFramework> | ||
| <PackAsTool>true</PackAsTool> | ||
| <ToolCommandName>mytool</ToolCommandName> | ||
| <RuntimeIdentifier>win-x64;linux-x64;osx-arm64</RuntimeIdentifier> |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property name should be RuntimeIdentifiers (plural) not RuntimeIdentifier (singular) when specifying multiple RID values. The plural form is required when you provide a semicolon-delimited list of RIDs.
| <RuntimeIdentifier>win-x64;linux-x64;osx-arm64</RuntimeIdentifier> | |
| <RuntimeIdentifiers>win-x64;linux-x64;osx-arm64</RuntimeIdentifiers> |
| - **DotnetTool**: The top-level package that contains metadata | ||
| - **DotnetToolRidPackage**: The RID-specific packages that contain the actual tool binaries |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
List items with more than three words must end with periods. Add periods to the end of both list items.
|
|
||
| ### ToolPackageRuntimeIdentifier property | ||
|
|
||
| Alternatively, use `ToolPackageRuntimeIdentifier` for tool-specific RID configuration: |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text should reference ToolPackageRuntimeIdentifiers (plural), not ToolPackageRuntimeIdentifier (singular), as the property accepts multiple RID values.
| @@ -0,0 +1,214 @@ | |||
| --- | |||
| title: Create RID-specific, self-contained, and AOT .NET tools | |||
| description: Learn how to create and package RID-specific, self-contained and AOT .NET tools for platform-specific distribution. | |||
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add an Oxford comma before "and" in the list. It should read: "RID-specific, self-contained, and AOT .NET tools".
| <TargetFramework>net9.0</TargetFramework> | ||
| <PackAsTool>true</PackAsTool> | ||
| <ToolCommandName>mytool</ToolCommandName> | ||
| <ToolPackageRuntimeIdentifier>win-x64;linux-x64;osx-arm64</ToolPackageRuntimeIdentifier> |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The property name should be ToolPackageRuntimeIdentifiers (plural) not ToolPackageRuntimeIdentifier (singular) when specifying multiple RID values with a semicolon-delimited list.
| <ToolPackageRuntimeIdentifier>win-x64;linux-x64;osx-arm64</ToolPackageRuntimeIdentifier> | |
| <ToolPackageRuntimeIdentifiers>win-x64;linux-x64;osx-arm64</ToolPackageRuntimeIdentifiers> |
|
|
||
| ### RuntimeIdentifier property | ||
|
|
||
| Use `RuntimeIdentifier` to specify the platforms your tool supports: |
Copilot
AI
Nov 14, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text should reference RuntimeIdentifiers (plural), not RuntimeIdentifier (singular), as the property accepts multiple RID values.
Summary
Adds comprehensive documentation for RID-specific and AOT-enabled .NET tools introduced in SDK 10.0.100-preview.6, enabling platform-specific distribution of native, trimmed tools.
Changes
New Article:
rid-specific-tools.mdDocuments the complete workflow for creating platform-specific tools:
RuntimeIdentifiersorToolPackageRuntimeIdentifiersMSBuild propertiesdotnet packgenerates N+1 packages (one per RID + pointer)dotnet pack -r <RID>on target systemsDotnetTool(metadata) vsDotnetToolRidPackage(binaries)Cross-references
global-tools-how-to-create.mdandglobal-tools.mdExample Configuration
Produces packages:
mytool.1.0.0.nupkg,mytool.win-x64.1.0.0.nupkg,mytool.linux-x64.1.0.0.nupkg,mytool.osx-arm64.1.0.0.nupkgOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews