0

I'm watching a tutorial about ASP.NET CORE Identity,In it the instructor add identity by scaffolding it using Visual Studio, but right now I'm using Rider IDE and i'm not seeing such option on it, so i believe is a exclusive feature of Visual Studio. So is there a way to implement it on Rider IDE? or I'm forced to do it on Visual Studio and then come back to rider again?

Manguera v
  • 412
  • 2
  • 6
  • 15

1 Answers1

2

From the Terminal in Rider (default located at the bottom of the IDE) you can run the following commands (Full Reference).

dotnet tool install -g dotnet-aspnet-codegenerator

If you've already got the dotnet-aspnet-codegenerator tool installed, you may need to update it:

dotnet tool update -g dotnet-aspnet-codegenerator

Make sure you're switched in to the project directory if not already (not the solution root, cd ProjectName.

Then install the Microsoft.VisualStudio.Web.CodeGeneration.Design package either via the NuGet tab, or the command line (dotnet add package Microsoft.VisualStudio.Web.CodeGeneration.Design).

Then run the following to generate default project:

dotnet aspnet-codegenerator identity

The Identity Area will be populated with both Data and Pages folders in your project.

A real world example (with an existing DbContext and using Sqlite) is:

dotnet aspnet-codegenerator identity -dc ApplicationDbContext -gl -sqlite -f

Rudi Visser
  • 21,350
  • 5
  • 71
  • 97