Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support `dotnet tool install` from local nuget package file

See original GitHub issue

Is there are way to install dotnet tools from nupkg files created by dotnet pack <project>?

I want to quickly install and test my CLI tool but dotnet tool install requires installation from a nuget source.
I can create a local nuget source with nuget add source d:\path\to\nuget\files but a way to directly install nupkg files would be great

>dotnet tool install -g My.Package.1.0.0.nupkg
error NU1101: Unable to find package my.package.cli.1.0.0.nupkg. No packages exist with this id in source(s): roslyn, local, Microsoft Visual Studio Offline Packages,
The tool package could not be restored.
Tool 'my.package.1.0.0.nupkg' failed to install. This failure may have been caused by:

* You are attempting to install a preview release and did not use the --version option to specify the version.
* A package by this name was found, but it was not a .NET tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

For more reasons, including package naming enforcement, visit
>dotnet --list-sdks
3.1.201 [C:\Program Files\dotnet\sdk]
3.1.302 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
5.0.100-preview.7.20366.6 [C:\Program Files\dotnet\sdk]

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:16
  • Comments:7

github_iconTop GitHub Comments

artemshadrunovcommented, Sep 30, 2020

I think that you can use: dotnet tool install --global --add-source <path-to-your-nuget-package> <tool-name>

adrien-constantcommented, Nov 25, 2020

I think that you can use: dotnet tool install --global --add-source <path-to-your-nuget-package> <tool-name>

Just a quick note because I did the mistake, <path-to-your-nuget-package> is the path of the folder, not the nupkg file. File name is loaded from <tool-name>

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet tool install command - .NET CLI
The dotnet tool install command installs the specified .NET tool on your machine.
Read more >
Add a package with a local package file in 'dotnet'
Using the dotnet command line tool, how can I add a reference to an existing local package that is not downloaded with NuGet?...
Read more >
dotnet-tool-install: Installs the specified .NET tool on ...
The dotnet tool install command provides a way for you to install .NET tools on your machine. To use the command, you specify...
Read more >
Unable to install dotnet tool from private nuget feed
I have a dotnet tool that is published as a Nuget package to a private feed. From a YAML pipeline I would like...
Read more >
New in .NET Core 3.0: local tools
In this post I show how to install and run local tools in .NET Core 3.0 using a dotnet-tools manifest and discuss how...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found