I am trying to modify the existing identity by generating identity pages. I am using Visual Studio for Mac 2022 with ASP.Net 6 MVC.
The tutorials for Windows say to add a new scaffolding and select 'Identity', but there doesn't seem to be an option for Mac. Is this possible?
So far the best workaround I have found is to spin up Visual Studio on a Windows machine, scaffold the page(s) you want to override, then go back to your Mac.
You'll need source control. I used GitHub but any source control should do.
Then you can go back to working on your Mac.
It seems the only way to do it purely on Mac is to use the Do.net CLI.
The Microsoft documentation details this: https://learn.microsoft.com/en-us/as.net/core/security/authentication/scaffold-identity?view=as.netcore-7.0&tabs.netcore-cli
First you need to install the ASP.NET Core scaffolder:
do.net tool install -g do.net-as.net-codegenerator
Then to scaffold all pages:
do.net as.net-codegenerator identity -dc MyApplication.DataContext
Or specific pages:
do.net as.net-codegenerator identity -dc MyApplication.DataContext --files "Account.Register;Account.Login"
It is a strange there isn't a non-CLI approach for Mac users yet.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.