When installing a .NET local tool, create the tool manifest if one does not exist
See original GitHub issueWhen a user tries to install a .NET tool as a local tool on a folder that does not contain the manifest, we get an error Cannot find a manifest file
.
> dotnet tool install --local Cake.Tool --version 0.38.4
Cannot find a manifest file.
For a list of locations searched, specify the "-d" option before the tool name.
If you intended to install a global tool, add `--global` to the command.
If you would like to create a manifest, use `dotnet new tool-manifest`, usually in the repo root directory.
However, if the user tries to update an existing local tool, dotnet tool
is able to update the existing manifest:
dotnet new tool-manifest
dotnet tool install --local Cake.Tool --version 0.38.4
dotnet tool update --local Cake.Tool
Tool 'cake.tool' was successfully updated from version '0.38.4' to version '0.38.5' (manifest file /Users/augustoproiete/.config/dotnet-tools.json).
TL;DR; It would be great if dotnet tool install
automatically created the tool manifest, if one does not exist when installing a local tool, instead of failing with an error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:16 (7 by maintainers)
Top Results From Across the Web
Tutorial: Install and use .NET local tools - .NET CLI
This tutorial teaches you how to install and use a local tool. You use a tool that you create in the first tutorial...
Read more >dotnet tool install command - .NET CLI
To install a global tool in a custom location, use the --tool-path option. To install a local tool, omit the --global and --tool-path...
Read more >.NET Tools - Cannot find a manifest file
To install a tool for local access only, it has to be added to a tool manifest file. As I didn't create such...
Read more >Fixing error in .NET Core tool installation
Last week I was testing some .NET tooling and wanted to install a tool locally instead of globally. To do so you run...
Read more >Why does my dotnet tool run when installed locally, but not ...
I've written a dotnet tool following the documentation, targeting .NET 6. I can install and run it as a local tool. It works...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Finding an analog, NPM does this by default as well with package.json and puts it in the right place. Users who do
npm install moment
for example, get a non-global package and a package.json dropped in the right place. We should have the similar and easy experience reducing the ceremony for such things.Add a
--force
or--trust-me
parameter so users can convincedotnet tool
that they know what they are doing? 😄