Implicit restore for cli tools
See original GitHub issuedotnet build
now has implicit restore and it’s considered a good thing.
Unfortunately we don’t have it for cli tools.
Consider commands like: dotnet fable webpack-dev-server
(see https://github.com/SAFE-Stack/SAFE-BookStore/blob/master/build.fsx#L212)
They just fail with something along the lines “Can’t find command “dotnet-fable” not found”
It would make things so much easier if cli would restore in that case and rerun.
Environment data
dotnet --info
output : 2.0.0
Issue Analytics
- State:
- Created 6 years ago
- Reactions:37
- Comments:21 (9 by maintainers)
Top Results From Across the Web
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >Implicit restore for cli tools · Issue #8756 · dotnet/sdk
Example for an unknown command with implicit restore: dotnet builf (typo); if tool references exist then dotnet needs to check if dotnet-builf ...
Read more >Restores the dependencies and tools of a project. | dotnet- ...
The dotnet restore command uses NuGet to restore dependencies as well as project-specific tools that are specified in the project file.
Read more >10 commands you don't want to be without in .Net Core
Here's a full list of commands that runs restore implicitly: dotnet new; dotnet build; dotnet build-server; dotnet run; dotnet test; dotnet publish; dotnet...
Read more >NET Core CLI - Create/update/modify/build and package a ...
Explicitly, you type dotnet restore in the command line and this fetches the packages you need. The explicit command is particularly useful ...
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
I think that (3) is the right behavior; that is, I expect that people would want all tools restored if they have them specified in their project files.
Then, if the command still doesn’t exist, could we probe for commands which do exist and list them in the error message?
I’d assume that any error due to a long restore on a slow connection wouldn’t be different than for any other package, right?
While I’m really looking forward for repository wide tools since day 1 (I’m original author of FAKE and Paket which always have been repository wide tools) I really think it’s unfortunate to call these “local”. In my opinion project tools continue to be super important, especially in times when we upgrade compilers in larger solutions. Let’s assume fable 2 was released an I want to upgrade. Now I may want to do this project by project and not in one big bang.
I hope you folks reconsider and continue to work on both “local” versions.
Alfonso Garcia-Caro notifications@github.com schrieb am Mi., 29. Aug. 2018, 23:12: