dotnet-local-tools

Manage local .NET CLI tools per repository using .config/dotnet-tools.json and dotnet tool restore.

3|Updated Jan 24, 2024
One-click install
npx skills add https://github.com/akoken/dotfiles --skill dotnet-local-tools-akoken
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-local-tools
Source: https://github.com/akoken/dotfiles/tree/main/config/.copilot/skills/dotnet-local-tools
Command: npx skills add https://github.com/akoken/dotfiles --skill dotnet-local-tools-akoken

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps teams manage local .NET CLI tools per repository by defining and restoring per-project tool sets via a manifest.

Core Features & Use Cases

  • Per-repo tool manifests: Define tools in .config/dotnet-tools.json to ensure consistent tooling.
  • Deterministic setup: Use dotnet tool restore to reproduce the exact tool versions across environments.
  • CI/CD readiness: Pin and install project-specific tools to match local development.
  • Use Case: In a multi-project solution, ensure all contributors and pipelines use the same versions of docfx, dotnet-ef, and incrementalist.

Quick Start

dotnet new tool-manifest dotnet tool install docfx dotnet tool restore

Frequently Asked Questions about dotnet-local-tools

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

FAQPage Schema
How do I manage .NET CLI tools consistently per repository?

To manage .NET CLI tools consistently per repository, define your project-specific tool versions in a .config/dotnet-tools.json manifest and use the dotnet tool restore command. This ensures contributors and pipelines use identical tool versions.

What is a dotnet tool manifest used for?

A dotnet tool manifest is used to declare local .NET CLI tools on a per-repo basis. Stored in .config/dotnet-tools.json, it ensures deterministic setup by allowing environments to reproduce exact tool versions across development and CI/CD workflows.

How do I pin .NET tool versions for CI/CD pipelines?

You pin .NET tool versions for CI/CD pipelines by installing tools into a local manifest using dotnet new tool-manifest and dotnet tool install. Running dotnet tool restore in your pipeline restores these exact pinned versions.

Can I use local .NET tools in a multi-project solution?

Yes, you can use local .NET tools in a multi-project solution. By defining a single tool manifest at the solution root, all projects within the repository share the same pinned tool versions, ensuring uniform tooling across the entire codebase.

Does dotnet tool restore work without global installations?

Yes, dotnet tool restore works without global installations by reading the .config/dotnet-tools.json file and installing the defined tools locally. This keeps tool sets isolated to the current repository rather than affecting the global environment.

Why are my .NET tools different versions across development environments?

Your .NET tools are different versions across environments because they are likely installed globally. To fix this, use a local tool manifest via dotnet new tool-manifest to pin tool versions and ensure consistent restoration across all setups.