dotnet-cli-distribution

Guide .NET CLI distribution strategies including Native AOT and single-file publish.

1|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-cli-distribution-rudironsoni
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-cli-distribution
Source: https://github.com/rudironsoni/dotnet-agent-harness/tree/main/.rulesync/skills/dotnet-cli-distribution
Command: npx skills add https://github.com/rudironsoni/dotnet-agent-harness --skill dotnet-cli-distribution-rudironsoni

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

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

Core Features & Use Cases

  • Distribution Strategy: Guides you in choosing between Native AOT, framework-dependent, self-contained, or dotnet tool packaging.
  • Cross-Platform Targeting: Helps plan your Runtime Identifier (RID) matrix for broad compatibility.
  • 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 reach, or as a framework-dependent app for smaller size when the .NET runtime is already present.

Quick Start

Use the dotnet-cli-distribution skill to determine the best publishing strategy for a cross-platform CLI application.

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 balancing startup time, binary size, and runtime dependencies. You can choose between Native AOT, framework-dependent, self-contained, or `dotnet tool` packaging strategies.

How do I choose between Native AOT and framework-dependent publishing for .NET?

Choose Native AOT for maximum reach and fast startup without runtime dependencies, or framework-dependent publishing for smaller binary size when the .NET runtime is already present on the target machine.

How do I plan a Runtime Identifier (RID) matrix for cross-platform .NET CLI targets?

Plan your Runtime Identifier (RID) matrix by identifying the specific operating systems and architectures your cross-platform CLI application needs to target, ensuring broad compatibility across platforms.

Can I publish a .NET console application as a single-file executable?

Yes, you can configure single-file publish for .NET console applications to optimize binary size. Single-file publish has been mature since .NET 6, with further features available in .NET 8.0+.

When should I use `dotnet tool` packaging instead of self-contained publishing?

Use `dotnet tool` packaging when distributing utilities for developers who already have the .NET SDK installed, and self-contained publishing when you need to deploy applications to environments lacking the .NET runtime.