The other day I tried to scaffold ASP.NET Identity for Sqlite (actually I wanted to scaffold it for Postgres but that's another story) from the CLI:
dotnet aspnet-codegenerator identity -dc IdentityDbContext -u AppUser -f -gl -dbProvider sqlite
Straight forward, but I got this error:
IdentityGeneratorTemplateMode2 does not contain a definition for 'UseSQLite'.
The project I was trying to add Identity to, has been a spike where I was trying out some stuff using
One thing I had changed in the project compared to others where I was scaffolding Identity successfully, was that the project contained a
As I was stuck I just tried guessing and deleted the
Startup.cs file and ran the scaffolding again.
And boom 💥, it did work successfully again.
Right now I don't know why the file caused this issue but I provided my learning to an existing GitHub issue so Microsoft can figure it out.
Make sure to read the follow up.Twitter preview Photo by Jackson Simmer on Unsplash