Skip to content

Project created with dotnet new wasmbrowser ignores the launchSettings.json in Visual Studio #108585

@dlemstra

Description

@dlemstra

Description

After running:

dotnet workload install wasm-tools
dotnet workload install wasm-experimental

and creating a project with dotnet new wasmbrowser the project seems to ignore the launchSettings.json file that is included in the project that was created. The file contains the following line:

{
  "profiles": {
      "TestDebug": {
      "commandName": "Project",
      "launchBrowser": true,
      "environmentVariables": {
          "ASPNETCORE_ENVIRONMENT": "Development"
      },
      "applicationUrl": "https://localhost:7085;http://localhost:5200",
      "inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
      }
  }
}

But when the application starts the following is shown:

WasmAppHost --use-staticwebassets --runtime-config C:\Projects\TestDebug\bin\Debug\net9.0\TestDebug.runtimeconfig.json

App url: http://127.0.0.1:60925/
App url: https://127.0.0.1:60926/
Debug at url: http://127.0.0.1:60925/_framework/debug
Debug at url: https://127.0.0.1:60926/_framework/debug

And when starting the project inside Visual Studio the browser is also not launched. With a Blazor project this needs to be done to attach the debugger inside Visual Studio to the debugger of the browser but that does not seem to happen here.

Reproduction Steps

See description

Expected behavior

That the launch settings are used and the project can be debugged inside Visual Studio when starting the project.

Actual behavior

Unable to change the launch port or debug the application with Visual Studio.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

.NET 9.0.100-rc.1.24452.12
Visual Studio 2022 Preview (17.20.0 Preview 2.1)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions