question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failure to publish WASM when project source path contains blank spaces - Post-upgrade VS 2022 to 17.2.4

See original GitHub issue

Since upgrade of Visual Studio 2022 from 17.2.3 to 17.2.4 on june 15th, I cannot publish any Blazor Web Application project anymore.

This goes for new and existing projects. Even a simple publish to folder fails with error message:

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.

After hours of frustating attempts, I found that it was related to the location of my projects. Parent path to my dev folder contained blank spaces!

Changing VS MSBuild output verbosity, I found that the error was related to Blazor WebAssembly publish artifacts compression task:

...
Compressing Blazor WebAssembly publish artifacts. This may take a while...
Creating directory "obj\Release\net6.0\compress\".
C:\Program Files\dotnet\dotnet.exe "C:\Program Files\dotnet\sdk\6.0.301\Sdks\Microsoft.NET.Sdk.BlazorWebAssembly\targets\..\tools\net6.0\Microsoft.NET.Sdk.BlazorWebAssembly.Tool.dll" brotli
-s
C:\Dev\With Space\BlazorAppSol\BlazorApp\Client\bin\Release\net6.0\wwwroot\_framework\blazor.webassembly.js
-o
C:\Dev\With Space\BlazorAppSol\BlazorApp\Client\obj\Release\net6.0\compress\N6++qccl.br
...
Unrecognized command or argument 'Space\BlazorAppSol\BlazorApp\Client\bin\Release\net6.0\wwwroot\_framework\blazor.webassembly.js'.
...
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.

The above output was produced by creating a new Blazor Web Assembly project under a root folder with path 'C:\Dev\With Space' and publishing it to relative folder 'bin\Release\net6.0\publish'.

Is this a known issue?

Configuration: Windows 10 Enterprise 21H2 Build 19044.1766 Visual Studio Enterprise 2022 64-bit version 17.2.4 Blazor WebAssembly App project with .NET 6 and ASP.NET Core host

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:14
  • Comments:41 (16 by maintainers)

github_iconTop GitHub Comments

15reactions
baronfelcommented, Sep 6, 2022

A status update on this - we have an approved fix for servicing that we will merge one the September releases go out, so the final fix for this will be in the October releases of the .NET SDK.

8reactions
HClausingcommented, Aug 11, 2022

I’ve updated my VS2022 Preview yesterday, and my (production) VS 2022 is failing to publish with this same error on SDK 6.0.400.

The global.json file forcing the 6.0.300 version solved the problem also.

I’m just taking a note for the possibility of the bug is back on the 6.0.400.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet.exe exited with code 1 - Microsoft Q&A
It seems that this is a known issue: Failure to publish WASM when project source path contains blank spaces - Post-upgrade VS 2022...
Read more >
Can't Publish WASM to IIS
You can use the following command to view the list of installed workloads and check if the wasm-tools-net6 workload is installed correctly.
Read more >
Administering Oracle Identity Governance
This revision of Administering Oracle Identity Governance contains bug fixes and editorial corrections. Updates in October 2022 Documentation Refresh for ...
Read more >
Space in path causes error - Development Platforms
Warning: the task 'PlatformIO: Build' is a shell command and either the command name or one of its arguments has unescaped spaces.
Read more >
Quincy
Quincy . Quincy is the 17th stable release of Ceph. It is named after Squidward Quincy Tentacles from Spongebob Squarepants.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found