liveBook · Manning

.NET tool

As explained in Pro ASP.NET Core 7, Tenth Edition

A .NET CLI package that installs commands executable from the command line for performing development or project-management operations.

.NET tools are CLI packages that add commands for .NET project and development operations. They are managed with dotnet tool and invoked through the dotnet command. section 4.4.2

Choose the installation scope deliberately:

  • Install globally with --global when the command should be available across projects. section 4.4.2
  • Install into one project when the tool belongs to that project's setup, then invoke it with dotnet tool run <command>. section 4.4.2
  • Remove an existing version before installing the required version; uninstalling an absent package produces an error. section 4.4.2

Install and verify Entity Framework Core tools

dotnet tool uninstall --global dotnet-ef dotnet tool install --global dotnet-ef --version 7.0.0 dotnet ef --help The dotnet-ef tool supplies commands for managing databases, DbContext types, and migrations. The project still needs compatible Entity Framework Core packages, such as Microsoft.EntityFrameworkCore.Design and Microsoft.EntityFrameworkCore.SqlServer. section 17.5.1

Listing 4.14 Installing a tool package
dotnet tool uninstall --global dotnet-ef
dotnet tool install --global dotnet-ef --version 7.0.0

View the complete installation commands for replacing a global dotnet-ef tool. section 4.4.2

Listing 4.15 Running a tool package command
dotnet ef --help

View the verification command used to confirm that the installed tool responds. section 4.4.2

How Pro ASP.NET Core 7, Tenth Edition covers it

How deep it goes
Explains global and project-local installation, replacement, invocation, and verification without detailing tool implementation internals.
Examples
Uses dotnet-ef 7.0.0, dotnet ef --help, and Entity Framework Core SQL Server package commands.
What it assumes
Assumes the .NET SDK command line and project folders, while demonstrating tool installation from zero.
What you can do after
Operate/configure CLI development tools and verify commands such as dotnet ef from a project folder.
How it connects
Connects .NET CLI tools with Entity Framework Core, NuGet packages, database management, and migrations.

Also explained in

Compare how 2 books explain .NET tool →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Pro ASP.NET Core 7, Tenth Edition. The section links point to the parts of the book it draws on.