dotnet-cli-distribution

Guide .NET CLI distribution strategy selection across Native AOT, framework-dependent, self-contained, and dotnet tool packaging.

71|10|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-cli-distribution-wshaddix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-cli-distribution
Source: https://github.com/wshaddix/dotnet-skills/tree/main/skills/dotnet-cli-distribution
Command: npx skills add https://github.com/wshaddix/dotnet-skills --skill dotnet-cli-distribution-wshaddix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you decide the most effective way to package and distribute your .NET command-line applications, balancing factors like startup time, binary size, and runtime dependencies.

Core Features & Use Cases

  • Distribution Strategy Comparison: Understand the trade-offs between Native AOT, framework-dependent, self-contained, and dotnet tool packaging.
  • RID Matrix Guidance: Identify the correct Runtime Identifiers for cross-platform targeting.
  • Size Optimization: Learn techniques to minimize binary size for CLI tools.
  • Use Case: You've built a new .NET CLI tool and need to decide whether to publish it as a single-file Native AOT executable for maximum performance and ease of distribution, or as a framework-dependent app for smaller artifacts when the .NET runtime is guaranteed.

Quick Start

Guide me in choosing the optimal distribution strategy for a new .NET CLI tool targeting Linux and Windows.

Frequently Asked Questions about dotnet-cli-distribution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What is the best way to distribute a .NET CLI application?

The best way to distribute a .NET CLI application depends on your needs, choosing between Native AOT for fast startup, framework-dependent for smaller size, self-contained for zero dependencies, or dotnet tool packaging. This strategy balances startup time, binary size, and runtime dependencies.

How do I publish a .NET CLI tool as a single-file executable?

To publish a .NET CLI tool as a single-file executable, you must configure your single-file publish settings and select a distribution strategy. This process minimizes binary size and ensures cross-platform distribution by bundling the application and its dependencies into one executable.

Native AOT vs framework-dependent .NET publishing: which should I choose?

Choose Native AOT publishing for maximum performance and ease of distribution without runtime dependencies, or framework-dependent publishing for smaller artifacts when the .NET 8.0+ runtime is guaranteed on the target machine. Your choice depends on whether you prioritize startup time or download size.

Do I need .NET 8.0 to use Native AOT for CLI distribution?

Yes, you need a .NET 8.0+ baseline to use Native AOT features for CLI distribution. This Skill assumes the .NET 8.0+ runtime is present to leverage Native AOT compilation, which provides maximum performance and ease of distribution for your command-line tools.

How do I determine the correct Runtime Identifier (RID) matrix for cross-platform .NET tools?

You determine the correct Runtime Identifier (RID) matrix by planning your cross-platform targeting strategy for Linux and Windows. This guidance helps identify the specific RIDs needed to ensure your .NET CLI tool publishes correctly across different operating system architectures.

What are the limitations of using Native AOT for .NET CLI distribution?

Limitations of Native AOT for .NET CLI distribution include larger binary sizes compared to framework-dependent apps and potential compatibility constraints with dynamic features. You should avoid Native AOT if you need smaller artifacts and can guarantee the .NET runtime is already installed.