Closed dlemstra closed 2 weeks ago
Tagging subscribers to 'arch-wasm': @lewing See info in area-owners.md if you want to be subscribed.
Tagging subscribers to this area: @thaystg See info in area-owners.md if you want to be subscribed.
Thank you for the report! It was already fixed in https://github.com/dotnet/runtime/pull/107392 and will be included in RC2. I'm going to close the issue now, feel free to reopen it if you face the problem in RC2 or later.
Does that fix also resolve the issue of launching the browser and debugging the application inside Visual Studio or is this just the ports?
Also launching and debugging from VS, it was all connected.
This issue was resolved and debugging now works again in this test application. Thanks for fixing this @maraf. I did notice something interesting in our application that does something similar. We were using Microsoft.NET.Sdk.BlazorWebAssembly
as the project SDK instead of Microsoft.NET.Sdk.WebAssembly
and that results in the following failure:
WasmAppHost --use-staticwebassets --runtime-config C:\Projects\TestDebug\bin\Debug\net9.0\TestDebug.runtimeconfig.json
Error: Cannot find runtime config at C:\Projects\TestDebug\bin\Debug\net9.0\TestDebug.runtimeconfig.json
Not sure if this is by design so I though I would mention that here.
And the error message in Visual Studio also send me in the wrong direction:
If you are using Microsoft.NET.Sdk.BlazorWebAssembly
you should include Microsoft.AspNetCore.Components.WebAssembly.DevServer
package reference (as Blazor template does). The development time server is not shared yet between (vanilla) Wasm and Blazor.
The one used by Wasm needs a runtime config and Blazor SDK disables runtime config, because it doesn't need it.
Description
After running:
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:But when the application starts the following is shown:
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)