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 command failed in Linux

See original GitHub issue

Describe the bug

When I try to run any of the Entity Framework Core UI tools I get the same error. “EF Core command failed”. The error shows the command that I tried however if I were to copy the command into the terminal in Rider the command will execute.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new ASP.NET Core Web Application. SDK: Net 6, Web App (MVC), Individual Authentication
  2. Try to use the tool

Expected behavior

This is the error I received: Command: dotnet ef database update --project /home/<username>/<path-to-project>/<projectname>.csproj --startup-project /home/<username>/<path-to-project>/<projectname>.csproj --context <projectname>.Data.ApplicationDbContext --configuration Debug 00000000000000_CreateIdentitySchema Output: Unable to retrieve project metadata. Ensure it's an SDK-style project. If you're using a custom BaseIntermediateOutputPath or MSBuildProjectExtensionsPath values, Use the --msbuildprojectextensionspath option. Error: Could not execute because the application was not found or a compatible .NET SDK is not installed. Possible reasons for this include: * You intended to execute a .NET program: The application 'msbuild' does not exist. * You intended to execute a .NET SDK command: It was not possible to find any installed .NET SDKs. Install a .NET SDK from: https://aka.ms/dotnet-download Exit code: 1

Environment (please complete the following information):

  • OS: Ubuntu 20.04.4 x86_64
  • .NET SDK info (installed ones and version used within Rider): (installed) 3.1, 5; (using) Net 6.0.301
  • Plugin version: 1.4.0
  • Rider version: 2022.1.2

Additional context

I have manually installed the .Net SDKs that I used because snap is annoying. I don’t know if that affects this bug.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cmcglownjrcommented, Jun 25, 2022

Ok thank you for your hard work on this tool.

0reactions
seclerpcommented, Jun 27, 2022

Closing this as a fix will be available in the next update.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Solve the Command or File Was Not Found EF Core ...
In this article, we are going to learn how to solve the Command or File Was Not Found EF Core migration error.
Read more >
Command dotnet ef not found - Stack Overflow
I tried to forcibly install Microsoft.EntityFrameworkCore just in case it needs to be explicitly added. I ran into the error message telling me ......
Read more >
dotnet ef migrations commands not working in Linux #19605
Create new .net core project. Separate csproj's for the DbContext, Migrations, and console app. ; Run dotnet ef migration script. SQL script is ......
Read more >
EF Core tools reference (.NET CLI) - Microsoft Learn
Opens files generated by a command after the command is completed. Provides tab completion of commands, parameters, project names, context types ...
Read more >
Debugging Entity Framework Core migration scaffolding and ...
dotnet ef database update Build started... Build succeeded. ... fail: Microsoft.EntityFrameworkCore.Database.Command[20102] Failed executing ...
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