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

EF Commands #4555

Closed
dneimke opened this issue Feb 13, 2016 · 7 comments

Comments

@dneimke
Copy link

commented Feb 13, 2016

is it possible to run EF Commands again ? e.g. is there a dotnet CLI version of the EF commands that we can run?

@gdoron

This comment has been minimized.

Copy link

commented Feb 14, 2016

@bricelam

This comment has been minimized.

Copy link
Member

commented Feb 16, 2016

They should be usable (but not throughly tested) now. Add the following to your project.json

{
  "tools": {
    "dotnet-ef": "1.0.0-*"
  }
}

Then restore, build, and use the tool just like you did dnx ef

cd src\MyProject
dotnet restore
dotnet build
dotnet ef dbcontext list
@bricelam

This comment has been minimized.

Copy link
Member

commented Feb 16, 2016

Closing. Use #3925 to track further progress of the .NET-Core-CLI-based commands.

@bricelam bricelam closed this Feb 16, 2016
@dneimke

This comment has been minimized.

Copy link
Author

commented Feb 16, 2016

Thanks!

@capesean

This comment has been minimized.

Copy link

commented Feb 22, 2016

When I run an EF command, I get No executable found matching command "dotnet-ef"

Am I missing something?

@bricelam

This comment has been minimized.

Copy link
Member

commented Feb 23, 2016

Did you run dotnet restore first? Are you in the directory containing the project.json?

@capesean

This comment has been minimized.

Copy link

commented Feb 23, 2016

Trying it in an "empty" project I now get Failed to initialize CoreCLRm after running dotnet restore successfully.

project.json is:

{
  "compilationOptions": {
    "emitEntryPoint": true
  },
  "dependencies": {
    "Microsoft.AspNetCore.Hosting": "1.0.0-*",
    "Microsoft.EntityFrameworkCore": "1.0.0-*",
    "Microsoft.EntityFrameworkCore.Commands": "1.0.0-*",
    "Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*",
  },
  "commands": {
      "ef": "EntityFrameworkCore.Commands"
  },
  "frameworks": {
    "net451": { }
  },
  "tools": {
    "dotnet-ef": "1.0.0-*"
  }
}

And:

PM> dotnet --version
.NET Command Line Tools (1.0.0-beta-001496)

Product Information:
 Version:     1.0.0-beta-001496
 Commit Sha:  962411969e

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 Runtime Id:  win7-x64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.