Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The .NET tool packaging process has changed when RuntimeIdentifiers are present in the project.
Since the SDK now supports creating platform-specific tools, RuntimeIdentifiers are used to determine the set of platforms for which to create tool packages.
Version introduced
.NET 10 Preview 6
Previous behavior
Previously when you ran dotnet pack on a project with PackAsTool set to true, it ignored any RuntimeIdentifiers.
New behavior
Starting in .NET 10, RuntimeIdentifiers are used to determine the set of platforms for which to create tool packages.
Type of breaking change
This is a behavioral change.
Reason for change
This change enables the creation of optimized, platform-specific .NET Tool packages, and supports use cases like:
- Self-contained tools.
- Trimmed and AOT tools.
- Tools that can eventually be used on platforms without an SDK or runtime installed.
Recommended action
If you want to create tools for only a subset of platforms, use ToolPackageRuntimeIdentifiers. If you want to disable RID-specific tool packages entirely, you should conditionally include or exclude the RuntimeIdentifiers property in your project file.
Affected APIs
None.