rider-efcore
rider-efcore copied to clipboard
Cannot start migrations
Describe the bug
I am unable to execute the dotnet-ef using the GUI available in Rider; instead, it shows an error that dotnet-ef
is not found, and when I try to fix it, it presents me with Tool 'dotnet-ef' is already installed.
I also verified it from a terminal and also was able to run migrations via cli.
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
A window should open with other options to proceed
Screenshots
Environment (please complete the following information):
- OS: Windows
- .NET SDK info (installed ones and versions used within Rider): 8.0, 6.0
- Plugin version: 232.1.0
- Rider version: 2023.2.1
Hi @anime-shed, on which level dotnet ef tools are installed? As a local tool on the solution level or as a global tool?
And does restarting Rider fix the issue?
@seclerp It is installed on the Global level and local level for some projects.
And restarting Rider did not solve it.
same issue with EF core tools, with rider 2023.2.3, .NET6, macos sonoma, plugin EntityFrameWork Core UI 232.1.0, the plugin try to install v8.0.0 from EF Core and isn't compatible with .NET6
Any news about this bug ?
@roberto-sotar Currently there is no way of installing a specific dotnet ef
tools version using "Install" action. The plugin always installs the latest stable version globally it it isn't already installed (quite oftenly, they are backward compatible). Because of that we can't rely on specific EF Core version of your solution (global tools are installed in per-machine basis).
So you have 2 options here:
- Install EF Core Tools globally with a specific version:
dotnet tool install --global dotnet-ef --version 6.0.25
- Install EF Core Tools locally inside solution folder
dotnet tool install dotnet-ef --version 6.0.25
In case you don't have a tool manifest file run
dotnet new tool-manifest
before installing tools locally
After installation, the EF Core UI plugin will acknowledge installed tools and you'll be able to perform migrations.
Please note, sometimes Rider doesn't see tools installed right after installation. It's a known issue and is already addressed in the upcoming 2023.3 release.
@seclerp hello! I have a question related to local dotnet tools. I have several projects with EF Core, but with different versions. Each project has specific dotnet tools. How can I switch to local dotnet tools instead of the global version?
Hi @my-dev-92, currently you can use one of 2 options:
- Globally installed tools (e.g.
dotnet tool install --global
, Rider installs tools this way when you do it using the "Install" action) - Locally installed in Solution (e.g.
dotnet tool install
on Solution level with Solution level tool manifest)
So Project-level tools are not supported yet. Please open a ticket on YouTrack but no ETA for now.
Hi @my-dev-92, currently you can use one of 2 options:
- Globally installed tools (e.g.
dotnet tool install --global
, Rider installs tools this way when you do it using the "Install" action)- Locally installed in Solution (e.g.
dotnet tool install
on Solution level with Solution level tool manifest)So Project-level tools are not supported yet. Please open a ticket on YouTrack but no ETA for now.
Sorry, I meant solutions instead of projects. E.g. Solution1 has a project with EF Core 6.x.x version and Solution2 has a project with EF Core 7.x.x version. And each of the solutions has a tool manifest file dotnet-tools.json
.
I thought that locally installed in Solution was used in EF Core UI. But I see the following:
@my-dev-92 could you please provide more details about your Solution's folder structure?