dotnet tool not recognized after local install
I am trying to locally install the tool
dotnet-mgcb-editor
from nuget into my repository. But it's not recognized after the installation.
Here are the commands I executed to install it, aswell as their output.
When I run dotnet tool list
, this is the output:
But when I try to run the tool, I get an error:
Here's the output of running dotnet --info
in the same repository:
And here's the content of my global.json
:
I have tried installing the tool globlally, too, but it leads to the same error.
Any pointers or advice would be greatly appreciated, as I am kind of lost here.4 Replies
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
Hmm, that worked for the other tool I was trying to install, but this one is still giving me the same error. Even after a full restart.
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I solved the issue.
In case anyone stumbles upon this in the future, the issue is in this innocuous little line:
* You intended to execute a .NET program, but dotnet-mgcb-editor-windows does not exist.
Notice how it doesn't say dotnet-mgcb-editor
? Yeah well I did not.
The solution is to also add dotnet-mgcb-editor-windows
(or -linux
/-mac
) as a tool.
Tl;dr: make sure your .config/dotnet-tools.json
contains all these entries:
And then run dotnet tool restore
.