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.

EF Core Migrations - No executable found matching command "dotnet-ef"

See original GitHub issue

We are trying to generate SQL scripts for the migrations dotnet ef migrations script {...} as part of the build process but there doesn’t seem to be a way of dealing with them at the moment (other than using visual studio). I might be missing something here but both vso build agents and azure apps are unable to apply migrations so I’m wondering how to do it as part of the CI/deployment pipeline.

Thanks

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
srfabiocommented, Sep 23, 2016

Visual studio 2015 Update 3 and dotnet 1.0.0-preview2-003131

Running as part of the CI build gives me this: No executable found matching command "dotnet-ef" .The offending build step is just a command line executing “dotnet ef migrations {etc}”

1reaction
rodyvansambeekcommented, May 3, 2019

I had the same problem. But changing the build definition to something like the following works:

- task: DotNetCoreCLI@2
  displayName: 'Generate EF Migrations script'
  inputs:
    command: custom
    custom: 'ef'
    arguments: 'migrations script --project $(project) --output $(Build.ArtifactStagingDirectory)/SQL/$(scriptName) --context $(dbContext)  --idempotent'

It looks like the dotnet Core custom build task puts a dash between the dotnot executable and the custom command contains spaces. This seems like a bug.

Please reopen this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No executable found matching command "dotnet-ef"
This error is caused because the Nuget is not able to find the solution file on the location. Solution:- Move to the directory...
Read more >
No executable found matching command "dotnet-ef ... - GitHub
I want to Migrate my Database with Models. I am using EF Core 2.0 Preview. dotnet ef migrations add InitialCreate dotnet : No...
Read more >
How to fix error — “dotnet : No executable found matching ...
While setting up new .NET Core Web API 2.0 projects with EF Core 2.0, you may encounter this error: “dotnet : No executable...
Read more >
No executable found matching command "dotnet-ef"
I am install Visual Studio 2017 with Windows 10. Follow the MVC Movie tutorial until Adding a Model sections. need to run few...
Read more >
Troubleshooting the dotnet ef command for EF Core Migrations
No executable found matching command "dotnet-ef" ... The current stable tooling for EF Core migrations is split into two packages.
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