34

I am new to .NET platform. From time to time, I had problems with Visual Studio and I decided to use Rider. It encouraged me again (I have been using JetBrains products for 2 years). But I can not find the NuGet console (which is so called in Visual Studio).

Where is it?

TuralAsgar
  • 1,275
  • 2
  • 13
  • 26
  • 1
    NuGet console in VS is based on PowerShell and Rider doesn't support it right now. It will be implemented in future versions (probably after official release). – AndreyAkinshin Mar 17 '17 at 19:40

7 Answers7

13

It's not accessible yet. Please vote this issue https://youtrack.jetbrains.com/issue/RIDER-435

Ali Dehqan
  • 461
  • 1
  • 8
  • 18
  • 1
    NuGet console in VS is based on PowerShell and Rider doesn't support it right now. It will be implemented in future versions. – Ali Dehqan Jan 21 '18 at 12:03
  • I'm new to the .NET world. From what I can tell Entity Framework is a library to make interaction with data stores easier. What does this have to do with an IDE supporting a package manager's shell? Am I missing something? – Blieque Jun 26 '18 at 11:04
  • 1
    @Blieque Yes. You must use package-manager console or GUI written for that. – TuralAsgar Jun 28 '18 at 16:22
8

It is available since Rider 2018.1.
Please see JetBrains' blog post about installation: https://blog.jetbrains.com/dotnet/2018/04/06/entity-framework-support-rider-2018-1/

enter image description here

P.S. tested on Rider 2020.2.1.

Noam Gal
  • 1,124
  • 1
  • 11
  • 15
  • 1
    its not supported in 2020.2. I created a asp.net core solution and installed ef. Tools/Entity Framework does not exist. – hce Aug 31 '20 at 13:10
  • @hce I'm using Rider 2020.2.1 and it's available. Did you try the right-clicking the project in the Explorer view? Please see my edited answer with an image. – Noam Gal Sep 01 '20 at 09:38
  • @Noam_Gal I get the confusion: I'am using Microsoft.EntityFrameworkCore v3.1.7. You are using Microsoft.EntityFramework. Rider is not supporting the core version of EntityFramework. – hce Sep 01 '20 at 14:01
  • @hce you are right. for Core there's no such solution (yet), only this article: https://blog.jetbrains.com/dotnet/2017/08/09/running-entity-framework-core-commands-rider/ – Noam Gal Sep 01 '20 at 18:56
  • If you did not found the option after right-clicking, first you must install the `EntityFramework` package and then you will see all the options for Entity Framework – NM Naufaldo May 07 '21 at 11:13
4

You Can use PowerShell on Windows "Where Your DbContext is" Like this:

dotnet ef


dotnet ef migrations add [Name]

behzad chhizari
  • 134
  • 1
  • 9
4

If you need to run entity framework commands such as

dotnet ef migrations add "initialSetup"

Then go to your terminal Alt+f12 or double-shift and type “terminal”. Then run:

dotnet tool install --global dotnet-ef

And then (making sure you're in your project directory):

dotnet ef migrations add "initialSetup"
Luke Garrigan
  • 4,571
  • 1
  • 21
  • 29
4

Although Rider has now added the UI for migration, unfortunately, if you use the latest dotnet feature the UI doesn't work.

For example, I created the project without Startup class file, the UI won't let me continue:

enter image description here

enter image description here

But I tried these commands which works:

dotnet tool install --global dotnet-ef

# You can type the DbContext manually now!
dotnet ef migrations add 'initial' --project src/IdentityServer/IdentityServer.csproj --context PersistedGrantDbContext

enter image description here

Then I execute:

dotnet ef database update --project src/IdentityServer/IdentityServer.csproj --context ConfigurationDbContext

Now the database updated with all the tables there: enter image description here

Jeff Tian
  • 5,210
  • 3
  • 51
  • 71
0

They haven't implemented the Package manager console yet. So you will have to use Visual studio for that

-4

You can use terminal toolwindow. Or NuGet manager (GUI)...

xtmq
  • 3,380
  • 22
  • 26