Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dotnet-ef from the .NET Core 3.0 SDK #14016

Closed
bricelam opened this issue Nov 26, 2018 · 10 comments · Fixed by dotnet/EntityFramework.Docs#1437
Closed

Remove dotnet-ef from the .NET Core 3.0 SDK #14016

bricelam opened this issue Nov 26, 2018 · 10 comments · Fixed by dotnet/EntityFramework.Docs#1437
Assignees
Labels
breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Milestone

Comments

@bricelam
Copy link
Contributor

bricelam commented Nov 26, 2018

The EF Core runtime isn't a part of the SDK anymore. It makes sense for dotnet ef to become just a plain old global tool too on NuGet.

@bricelam
Copy link
Contributor Author

bricelam commented Nov 30, 2018

@KathleenDollard can you keep us in the loop regarding any future plans for global tools that extend dotnet?

@bricelam bricelam changed the title Consider removing dotnet-ef from the .NET Core 3.0 SDK Remove dotnet-ef from the .NET Core 3.0 SDK Nov 30, 2018
@bricelam
Copy link
Contributor Author

Blocked on syncing with the CLI team about the future of tools.
Talking points:

  • Can templates install local tools? Do they have to be invoked using dotnet tool run ef or would dotnet ef still work?
  • Will a global tool continue to be able to extend the dotnet command? If not, should we rename our command now to avoid future breaks?

cc @wli3

@wli3
Copy link

wli3 commented Mar 15, 2019

Can templates install local tools? Do they have to be invoked using dotnet tool run ef or would dotnet ef still work?

Yes. You can add a tool manifest file in the template. We plan to bring back invoke by dotnet TOOLNAME https://github.com/dotnet/cli/pulls . As of today, the user need to run dotnet tool run TOOLNAME. And the user need an extra dotnet tool restore. But this is might change.

Will a global tool continue to be able to extend the dotnet command? If not, should we rename our command now to avoid future

We don't have plan to remove the extension. @KathleenDollard may have more thinking

@bricelam
Copy link
Contributor Author

Thanks, @wli3!

@bricelam
Copy link
Contributor Author

Hey cool, because of the code already in the CLI for source build, it looks like users will get this error when they try to run:

Cannot find command 'dotnet ef', please run the following command to install

dotnet tool install --global dotnet-ef

@bricelam bricelam added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Mar 25, 2019
@divega
Copy link
Contributor

divega commented Apr 15, 2019

@bricelam any chance we can create an entry in the breaking change page for this today in preparation for the preview 4 announcement?

@derigel23
Copy link

derigel23 commented Apr 27, 2019

Even after manually installation of dotnet-ef tool it is not available.
Got error The application to execute does not exist: 'C:\Users\Slava.Trenogin\.dotnet\tools\.store\dotnet-ef\2.2.4-servicing-10062 \dotnet-ef\2.2.4-servicing-10062\tools\netcoreapp2.2\any\dotnet-ef.dll'.
Real folder is "C:\Users\Slava.Trenogin\.dotnet\tools\.store\dotnet-ef\2.2.4\dotnet-ef\2.2.4\tools\netcoreapp2.2\any\dotnet-ef.dll"
As you can see, no -servicing-10062 suffix.

Installation was executed successfully with message:

dotnet tool install --global dotnet-ef
You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '2.2.4') was successfully installed.

@bricelam
Copy link
Contributor Author

bricelam commented Apr 30, 2019

Note, during pre-release, you'll need to specify the version:

dotnet tool install --global dotnet-ef --version 3.0.0-*

@khuramshahzad
Copy link

After lot of research and findings , i delete the already installed dotnet-ef (C:\Users\khurram.dotnet...) and install by using dotnet tool install --global dotnet-ef --version 3.0.0-* and it worked for me.

@korggy
Copy link

korggy commented Sep 12, 2020

How do I use dotnet-ef in automated Devops -> Azure App deployments now? My build step is throwing this error:

Could not execute because the specified command or file was not found.

I tried to install dotnet-ef via Kudu Debug Console and got the following sequence:

D:\home>dotnet tool install --global dotnet-ef
Tools directory 'D:\local\UserProfile\.dotnet\tools' is not currently on the PATH environment variable.

You can add the directory to the PATH by running the following command:

setx PATH "%PATH%;D:\local\UserProfile\.dotnet\tools"

You can invoke the tool using the following command: dotnet-ef
Tool 'dotnet-ef' (version '3.1.8') was successfully installed.

D:\home>setx PATH "%PATH%;D:\local\UserProfile\.dotnet\tools"

WARNING: The data being saved is truncated to 1024 characters.

ERROR: Access to the registry path is denied.

And, as predicted, if I try to use it:

D:\home>dotnet ef
Could not execute because the specified command or file was not found.
Possible reasons for this include:
  * You misspelled a built-in dotnet command.
  * You intended to execute a .NET Core program, but dotnet-ef does not exist.
  * You intended to r
un a global tool, but a dotnet-prefixed executable with this name could not be found on the PATH.

All the tutorials on the internet that I could find about how to do this are now out of date because they assume that dotnet-ef ships with dotnet, and I can't locate any official Microsoft documentation about how to deploy EF Core Migrations as part of an automated Devops deployment.

@ajcvickers ajcvickers removed their assignment Sep 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants