runtime icon indicating copy to clipboard operation
runtime copied to clipboard

C# webassembly dotnet publish fails when parenthesis are in user profile name

Open laifharwood opened this issue 1 year ago • 2 comments

Description

Getting the following error when executing a dotnet publish with web assembly without Blazor on .NET 9. on Windows. There is a parenthesis in my user profile name that seems to be causing the issue. It published without error on a previous computer that didn't have any special characters in the user profile name. Image

Reproduction Steps

  1. Login to a user profile that has parenthesis in the name, for example C:\Users\JohnDoe(US).
  2. Clone this repo
  3. Open command line in wasmbrowser directory.
  4. Execute dotnet publish.
  5. Notice the error.
  6. If you repeat steps on a profile that doesn't have parenthesis (C:\Users\JohnDoe) then it should publish successfully.

Expected behavior

Publishes without error when there is parenthesis in the user profile name.

Actual behavior

Here is the actual error after executing dotnet publish

C:_git\wasm-runtime-error\wasmbrowser>dotnet publish Restore complete (0.3s) wasmbrowser failed with 4 error(s) (1.1s) C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\9.0.9\Sdk\WasmApp.Common.targets(875,5): error : Failed to compile C:\temp\packages\microsoft.netcore.app.runtime.mono.multithread.browser-wasm\9.0.9\runtimes\browser-wasm\native\src\runtime.c -> C:_git\wasm-runtime-error\wasmbrowser\obj\Release\net9.0\wasm\for-publish\ru ntime.o 'C:\Users\LaifHarwood' is not recognized as an internal or external command, operable program or batch file. [took 0.21s] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\9.0.9\Sdk\WasmApp.Common.targets(875,5): error : Failed to compile C:\temp\packages\microsoft.netcore.app.runtime.mono.multithread.browser-wasm\9.0.9\runtimes\browser-wasm\native\src\driver.c -> C:_git\wasm-runtime-error\wasmbrowser\obj\Release\net9.0\wasm\for-publish\dri ver.o 'C:\Users\LaifHarwood' is not recognized as an internal or external command, operable program or batch file. [took 0.22s] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\9.0.9\Sdk\WasmApp.Common.targets(875,5): error : Failed to compile C:\temp\packages\microsoft.netcore.app.runtime.mono.multithread.browser-wasm\9.0.9\runtimes\browser-wasm\native\src\corebindings.c -> C:_git\wasm-runtime-error\wasmbrowser\obj\Release\net9.0\wasm\for-publi sh\corebindings.o 'C:\Users\LaifHarwood' is not recognized as an internal or external command, operable program or batch file. [took 0.23s] C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Sdk\9.0.9\Sdk\WasmApp.Common.targets(875,5): error : Failed to compile C:\temp\packages\microsoft.netcore.app.runtime.mono.multithread.browser-wasm\9.0.9\runtimes\browser-wasm\native\src\pinvoke.c -> C:_git\wasm-runtime-error\wasmbrowser\obj\Release\net9.0\wasm\for-publish\pi nvoke.o 'C:\Users\LaifHarwood' is not recognized as an internal or external command, operable program or batch file. [took 0.24s]

laifharwood avatar Oct 02 '25 14:10 laifharwood

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara See info in area-owners.md if you want to be subscribed.

Any updates to this?

Vx2gas avatar Jan 28 '26 16:01 Vx2gas