I have a Blazor WASM solution that had successfully published to a folder profile countless times. I updated VS2022 recently and suddenly the publish fails with the error output:
"C:\Program Files\dotnet\sdk\6.0.401\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\Microsoft.NET.Sdk.BlazorWebAssembly.6_0.targets(614,5): Error MSB6006: "dotnet.exe" exited with code 1"
Getting light hits on Google finding the same issue but no clear solutions. Sounds like it's possibly a bug with the latest SDK 6.0.401. I've tried implementing the global.json file in the project directory to force it to use and earlier SDK version but am getting the same error. Anybody have any ideas?
If anyone stumbles upon this having the same issue, it was that I had spaces in a folder name that my project was in. Not the folders within the project, but the Windows directory that had the project in it. Ex: \Documents\Other Projects[MyProject] - the space in "Other Projects" apparently breaks the publish. Copied the project to another folder with no spaces and it published with no issue.