-
Notifications
You must be signed in to change notification settings - Fork 242
Open
Description
Summary
Regardless of which options are selected, dotnet scaffold attempts to run the Azure CLI to check the logged in state of the user, obtain usernames and tenant IDs, and get Azure application IDs. On my machine, this adds a 30 to 45 startup time to any dotnet scaffold command (even dotnet scaffold --help).
The culprit is this line:
Scaffolding/src/dotnet-scaffolding/dotnet-scaffold/AspNet/Commands/AspNetOptions.cs
Line 199 in b278337
| _areAzCliCommandsSuccessful = AzCliHelper.GetAzureInformation(out List<string> usernames, out List<string> tenants, out List<string> appIds, out string? azCliErrors); |
It runs in the AspNetOptions constructor, which runs in AddScaffolderCommands(), which is called directly from Program.cs.
Proposed solution
The Azure CLI could be invoked lazily and only when the Entra ID scaffolder is selected.
Metadata
Metadata
Assignees
Labels
No labels