question-mark
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.

Unable to install any tools using dotnet tool install

See original GitHub issue

I am trying to install a global tool. However, I always get the same error message regardless of the tool I try to install (e.g. also for dotnetsay):

C:\Users\Christer\Source\Repos\faketest>dotnet tool install fake-cli -g
Failed to install tool package 'fake-cli': Could not find a part of the path 'C:\Users\Christer\.dotnet\tools\.store\.stage\0qd2mqpa.m45\fake-cli'.
Tool 'fake-cli' 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 Core tool.
* The required NuGet feed cannot be accessed, perhaps because of an Internet connection problem.
* You mistyped the name of the tool.

I have tried for several hours to clean up my environment, PATH, reinstall VS, etc., but I can’t figure out why this doesn’t work.

I get the same problem when specifying a tool path.

I’m sorry for what is evidently a support request, but I haven’t found anything on google, SO, etc. I’m one step short of reinstalling my whole system and have nowhere else to turn.

What could be wrong? Why doesn’t this work? What could I do to troubleshoot further?

dotnet info:

C:\Users\Christer\Source\Repos\faketest>dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.700
 Commit:    c2ef055a0f

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.17763
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.1.700\

Host (useful for support):
  Version: 2.2.5
  Commit:  0a3c9209c0

.NET Core SDKs installed:
  2.1.700 [C:\Program Files\dotnet\sdk]
  2.2.300 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.All 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.1.11 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 2.2.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12

github_iconTop GitHub Comments

26reactions
cmeerencommented, May 29, 2019

Nevermind, I found the issue. I removed the MSBuildSDKsPath environment variable and now everything works fine.

15reactions
mKay00commented, Apr 17, 2021

For me worked the following solution from https://github.com/dotnet/sdk/issues/4156#issuecomment-601791960

I used the following to get my dotnet nuget sources setup. Then it worked.

dotnet nuget add source --name nuget.org https://api.nuget.org/v3/index.json

Then the restore worked. Thank you coding|blocks community.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshoot .NET tool usage issues
Tool installation requires access to the NuGet feed that contains the tool package. It fails if the feed isn't available. You can alter...
Read more >
Dotnet fails to install tools - Microsoft Q&A
I cannot install the AWS Lambda tools in dotnet: $ dotnet tool install -g Amazon.Lambda.Tools error NU1100: Unable to resolve ...
Read more >
dotnet tool install command - .NET CLI
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 >
Tutorial: Install and use a .NET global tool - .NET CLI
This tutorial teaches you how to install and use a global tool. You use a tool that you create in the first tutorial...
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 >

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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found