Unable to F5 .NET Aspire Starter app from VS
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
I created a brand new .NET Aspire Starter App in the (current) latest version of VS (17.14.4), but when I hit F5 I get this exception..
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.

If I start it with CLI or add ASPNETCORE_URLS in launchSettings.json like suggested in #6609 it starts as expected.
However, I am facing with two issues:
1. the Aspire Dashboard isn't opened in the browser automatically (like in the mentionnend issue),
2. the project ressources are not attached to the debugger:

### Expected Behavior
The host project should start without issue when ASPNETCORE_URLS is not set
OR
The dashboard should open in the browser and project should be attached to the debugger
### Steps To Reproduce
Create a new project using the .NET Aspire Starter App in VS
Press F5
### Exceptions (if any)
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.

### .NET Version info
SDK .NET :
Version: 9.0.300
Commit: 15606fe0a8
Workload version: 9.0.300-manifests.af4147de
MSBuild version: 17.14.5+edd3bbf37
Environnement d'exécution :
OS Name: Windows
OS Version: 10.0.26100
OS Platform: Windows
RID: win-x64
Base Path: C:\Program Files\dotnet\sdk\9.0.300\
Charges de travail .NET installées :
[wasm-tools-net8]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 9.0.5/9.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.net8\9.0.5\WorkloadManifest.json
Type d'installation: Msi
[wasm-tools]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 9.0.5/9.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\9.0.100\microsoft.net.workload.mono.toolchain.current\9.0.5\WorkloadManifest.json
Type d'installation: Msi
[aspire]
Source de l’installation: VS 17.14.36202.13
Version de manifeste: 8.2.2/8.0.100
Chemin d'accès au Manifeste: C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
Type d'installation: Msi
Configuré pour utiliser loose manifests lors de l’installation de nouveaux manifestes.
Host:
Version: 9.0.5
Architecture: x64
Commit: e36e4d1a8f
.NET SDKs installed:
8.0.410 [C:\Program Files\dotnet\sdk]
9.0.204 [C:\Program Files\dotnet\sdk]
9.0.300 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 8.0.16 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 9.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
### Anything else?
Microsoft Visual Studio Community 2022
Version 17.14.4
VisualStudio.17.Release/17.14.4+36202.13
Microsoft .NET Framework
Version 4.8.09032
Installed Version: Community
ADL Tools Service Provider 1.0
This package contains services used by Data Lake tools
ASA Service Provider 1.0
ASP.NET and Web Tools 17.14.114.53116
ASP.NET and Web Tools
Azure App Service Tools v3.0.0 17.14.114.53116
Azure App Service Tools v3.0.0
Azure Data Lake Tools for Visual Studio 2.6.5000.0
Microsoft Azure Data Lake Tools for Visual Studio
Azure Functions and Web Jobs Tools 17.14.114.53116
Azure Functions and Web Jobs Tools
Azure Stream Analytics Tools for Visual Studio 2.6.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio
C# Tools 4.14.0-3.25229.6+871ef6369443071681de3351d30f41ea78ab48e6
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
GitHub Copilot 17.14.734.62261
GitHub Copilot is an AI pair programmer that helps you write code faster and with less work.
Microsoft Azure Hive Query Language Service 2.6.5000.0
Language service for Hive query
Microsoft Azure Stream Analytics Language Service 2.6.5000.0
Language service for Azure Stream Analytics
Microsoft Azure Tools for Visual Studio 2.9
Support for Azure Cloud Services projects
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Node.js Tools 1.5.61125.7 Commit Hash:d387982a7546304d617ed77b6d390e04b6558274
Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 6.14.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Razor (ASP.NET Core) 17.14.3.2528101+6ec16a88b93132798eb75aacd8b3df697370cafb
Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 17.14.26.0
Microsoft SQL Server Data Tools
ToolWindowHostedEditor 1.0
Hosting json editor into a tool window
TypeScript Tools 17.0.40502.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.14.0-3.25229.6+871ef6369443071681de3351d30f41ea78ab48e6
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual F# Tools 17.14.0-beta.25230.7+c1a9d78ad4a474a716ccffb4367ed5151e3f7c9f
Microsoft Visual F# Tools
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
Contributor guide
Assessment
This issue has not been assessed yet.