-
Notifications
You must be signed in to change notification settings - Fork 74
[Discussion] dotnet-watch and dotnet-user-secrets will move into the .NET Core CLI in 2.1.300 #399
Comments
@shanselman please use this thread instead of aspnet/Announcements#290 for discussion so we don't keep spamming subscribers on aspnet/Announcements. To answer your question aspnet/Announcements#290 (comment), for 2.1.300-preview1, dotnet-watch is installed like this:
This won't be necessary after preview1. |
@natemcmaster I think what @shanselman is getting at is that while it's great that it's no longer needed, the people who don't know that these tools are built in now will just see it as broken. It seems like it should provide a friendly error explaining that it's no longer needed because it's now built-in rather than failing with some obscure error. |
@natemcmaster @dfederm Maybe leaving a message for the user informing them that it's already installed won't be a bad idea. |
Thanks for the feedback. I agree - the error message is not very helpful in the situation @shanselman ran into. I've opened https://github.com/dotnet/cli/issues/8698 to provide a better error message for users.
Good point. That's a separate situation we had not thought of. I've opened dotnet/aspnetcore#2911 to see if we can provide some kind of message during restore to indicate that a DotNetCliToolReference is no longer needed. |
You should see an obsolete message in preview2 when you have a DotNetCliToolReference to a tool that is now bundled in the SDK. cref dotnet/sdk#2064 |
@natemcmaster What's the rationale behind bundling these tools with .net CLI? Can you provide some links to discussion, Community Standup, etc. regarding this decision? |
I don't think any of that discussion was out in the open. The gist of it is that the ASP.NET Core runtime is bundled with the SDK, so we thought it was also important to bundle tools for that runtime. We also think the global tools are a better model than the DotNetCliToolReference; DotNetCliToolReference required editing every .csproj that uses aspnetcore, the commands were only available in the project directory, and it made dotnet restore slower. cc @danroth27 @DamianEdwards if you want to share more thoughts. |
Closing as this issue as the 2.1.300 SDK has been released and includes this change. Feel free to continue discussion if you have more questions. |
$ dotnet --version
2.1.301
$ dotnet ef
Cannot find command 'dotnet ef', please run the following command to install
dotnet tool install --global dotnet-ef I'm still unable to use |
I don't know much about Manjaro Linux 17.1.10. How did you install dotnet on your machine? Can you share the output of |
@natemcmaster Manjaro Linux uses package repository from Arch Linux, and I installed dotnet-sdk with pacman.
|
Arch Linux support is community maintained. From what I can tell from the dotnet-sdk package definition the package contents do not contain dotnet-ef. I'm not sure why the Arch Linux maintainer decided to remove it, or if this was unintentional. Try downloading the Linux x64 SDK binaries (comes in a .tar.gz) from https://www.microsoft.com/net/download/linux instead and give that a try. Side note: you are also likely running into these error even after running
|
I didn't remove anything, if it's not there, it's because the source-build repo does not bundle it. |
@natemcmaster @alucryd Could you please kindly solve this problem? It gives me much pain not able to use |
@t123yh can you be more specific about which problem you are referring to? I would recommending opening an issue on https://github.com/aspnet/EntityFrameworkCore if you are still having issues with |
This is a discussion issue for aspnet/Announcements#290.
Update Feb. 28: Some clarification. This announcement was in regards to 2.1.300-preview2 versions of the CLI and up.
In 2.1.300-preview1, the following ASP.NET Core command line tools can be installed as a global command.
dotnet watch
dotnet user-secrets
dotnet sql-cache
In 2.1 Preview 1, these commands are not pre-installed. You must use the
dotnet install tool
command to acquire them.If you have an existing project with a
DotNetCliToolReference
to the packages below, you must remove theDotNetCliToolReference
in order to try the global version of the command.Prior to this release, these commands were only available if added to the MSBuild project as a
DotNetCliToolReference
and when executing "dotnet" in the project directory.Once installed globally, the commands are available from any project directory.
Note: Using
dotnet install tool
will only apply to 2.1 Preview 1. Before we release the RTM version of 2.1, these will become built-in commands in the .NET Core CLI.You won't need to use
DotNetCliToolReference
ordotnet install tool
to acquire these commands. This is what aspnet/Announcements#290 was intended to communicate.The text was updated successfully, but these errors were encountered: