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.

Implicit restore for cli tools

See original GitHub issue

dotnet 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”

image

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:closed
  • Created 6 years ago
  • Reactions:37
  • Comments:21 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
cartermpcommented, Sep 27, 2017

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?

$ dotnet fabuhl

No executable found matching command "dotnet-fable".  The following tools are available:

    dotnet-fable
    dotnet-watch

Did you mean one of these?
$

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?

3reactions
forkicommented, Aug 30, 2018

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:

Thanks a lot for the information and the link @KathleenDollard https://github.com/KathleenDollard! I didn’t understand very well when @livarcocc https://github.com/livarcocc talked about local tools but I’m very glad to see you’re planning to cover the repo-wise scenario (actually I do prefer tools being repo-wise rather than project-wise). Is there a place where, as a tool author http://fable.io/, we can follow the progress of this and give our opinion? At the moment my wish list would be:

  • Being able to pin the version repo-wise (I see you’re already on it). I guess @forki https://github.com/forki would love if this can be managed from a 3rd tool like Paket, but at a minimum I’d prefer not needing another extra file for this (global.json can be a good option indeed).
  • The tool would be installed automatically when restoring if not present in the machine.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dotnet/cli/issues/7715#issuecomment-417107661, or mute the thread https://github.com/notifications/unsubscribe-auth/AADgNNSWRAO9kXRG73Dl4LfKrS1kp2Mwks5uVwPRgaJpZM4PlwAi .

Read more comments on GitHub >

github_iconTop 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 >

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