Visual Studio 2022, Version 17.2.5 released with support of dot NET Ver 6.0.301.
In this version, if you publish the blazor webassembly project, you got error:
C:\Program Files\dotnet\sdk\6.0.301\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): Error MSB6006: "dotnet.exe" exited with code 1.
This error is a bug on dot NET 6.0.301 and you have to downgrade the system or change project to use dot NET version to 6.0.300.