aspire: Unable to F5 .NET Aspire Started Application from VS
Create a brand new .NET Aspire Started Application in VS and hit F5:
Unhandled exception. System.AggregateException: One or more errors occurred. (Failed to configure dashboard resource because ASPNETCORE_URLS environment variable was not set.)
---> Microsoft.Extensions.Options.OptionsValidationException: Failed to configure dashboard resource because ASPNETCORE_URLS environment variable was not set.
https://github.com/dotnet/aspire/assets/4403806/cc0e4c85-1876-4291-9da9-5d14fc0bd69e
At the same time, if launched from cli, everything starts up as expected:
https://github.com/dotnet/aspire/assets/4403806/1f26c03e-7f60-4085-b171-d0cfb39b01ce
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (11 by maintainers)
@kvenkatrajan I switched both to the preview release, and the issue has gone away. I used to have the latest stable release version, which had the issue.
I got the same error on VS Code (Windows) and found a workaround. Here’s the workaround:
launchSettings.jsonin the.AppHostproject.httpssection, copyapplicationUrlunder theenvironmentVariablesattribute and change its name toASPNETCORE_URLS.httpsection..AppHostproject.It should work, and I hope it’s fixed sooner rather than later.