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.

Windows 11 / .NET 8 Preview 3 - Blazor WASM Build Fail: "cache : warning : Accessing the Emscripten cache at "..." (for "sanity") is taking a long time, another process should be writing to it. "

See original GitHub issue

Windows 11 Config:

.NET SDKs installed: 8.0.100-preview.3.23178.7 [C:\Program Files\dotnet\sdk]

Microsoft Visual Studio Community 2022 (64-bit) - Preview Version 17.6.0 Preview 4.0

I’ve installed wasm-tools & wasm-experimental also

Complete dotnet --info at the end of this page.

Information & Build Error

I deploy my (static) Blazor WASM project to Cloudflare Pages. To build this project I’m using this command line on Windows 11 👇

dotnet publish Client.Tusk.csproj --nologo --force -c Release --arch x64 --os linux --self-contained true -o C:\X\Repos\Tusk\_CloudflarePublish`

I’m not sure if it’s necessary to specify ‘arch x64’ & ‘linux’ because it’s a static app served by Cloudflare Pages, but it always worked with every .NET (core) preview thus far. I’ve tried it without it too.

With .NET 8 Preview 3 on Windows 11 I’m getting this error:

Error Screenshot:

Screenshot 2023-04-25 150924

Error Text:

Determining projects to restore...
Restored C:\X\Repos\Tusk\SharedProjectTusk\SharedProject.Tusk.csproj (in 111 ms).
Restored C:\X\Repos\Tusk\ClientTusk\Client.Tusk.csproj (in 210 ms).
C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\X\Repos\Tusk\ClientTusk\Client.Tusk.csproj]
SharedProject.Tusk -> C:\X\Repos\Tusk\SharedProjectTusk\bin\Release\net8.0\SharedProject.Tusk.dll
Client.Tusk -> C:\X\Repos\Tusk\ClientTusk\bin\Release\net8.0\Client.Tusk.dll
Client.Tusk (Blazor output) -> C:\X\Repos\Tusk\ClientTusk\bin\Release\net8.0\wwwroot
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
SharedProject.Tusk -> C:\X\Repos\Tusk\SharedProjectTusk\bin\Release\net8.0\SharedProject.Tusk.dll
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
cache : warning : Accessing the Emscripten cache at "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.30.Cache.win-x64\8.0.0-preview.3.23172.2\tools\emscripten\cache" (for "sanity") is taking a long time, another process should be writing to it. If there are none and you suspect this process has deadlocked, try deleting the lock file "C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.Emscripten.3.1.30.Cache.win-x64\8.0.0-preview.3.23172.2\tools\emscripten\cache\cache.lock" and try again. If this occurs deterministically, consider filing a bug. [C:\X\Repos\Tusk\ClientTusk\Client.Tusk.csproj]

There’s no lock file in the specified directory.

I’ve deleted all installed SDK’s and reinstalled 8.0.100-preview.3.23178.7 and the WASM workloads again but it results in the same error.

Building the project on WSL Ubuntu works

When I install the ,NET Preview 3 SDK and the WASM workloads on WSL Ubuntu 22.04.2 LTS I’m not getting the error. The build succeeds, and I’m using the exact same command line in WSL Ubuntu.

WSL Ubuntu Build Screenshot:

Screenshot 2023-04-25 154201

Update:

When I’m looking at dotnet --info on Windows 11 I’m seeing this:

 [wasm-tools]
   Installation Source: SDK 8.0.100-preview.3, VS 17.6.33617.297

Both the SDK and VS have installed the wasm-tools workload.

Windows 11 ‘dotnet --info’

C:\Windows\System32>dotnet --info
.NET SDK:
 Version:   8.0.100-preview.3.23178.7
 Commit:    e300b0e1e6

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22621
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.100-preview.3.23178.7\

.NET workloads installed:
 [wasm-experimental]
   Installation Source: SDK 8.0.100-preview.3
   Manifest Version:    8.0.0-preview.3.23174.8/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.workload.mono.toolchain.current\WorkloadManifest.json
   Install Type:              Msi
 [wasm-tools]
   Installation Source: SDK 8.0.100-preview.3, VS 17.6.33617.297
   Manifest Version:    8.0.0-preview.3.23174.8/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.workload.mono.toolchain.current\WorkloadManifest.json
   Install Type:              Msi
 [maui-android]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    8.0.0-preview.3.8149/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.maui\WorkloadManifest.json
   Install Type:              Msi
 [maui-windows]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    8.0.0-preview.3.8149/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.maui\WorkloadManifest.json
   Install Type:              Msi
 [maui-maccatalyst]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    8.0.0-preview.3.8149/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.maui\WorkloadManifest.json
   Install Type:              Msi
 [maccatalyst]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    16.2.462-net8-p3/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.maccatalyst\WorkloadManifest.json
   Install Type:              Msi
 [android]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    34.0.0-preview.3.224/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.android\WorkloadManifest.json
   Install Type:              Msi
 [maui-ios]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    8.0.0-preview.3.8149/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.maui\WorkloadManifest.json
   Install Type:              Msi
 [ios]
   Installation Source: VS 17.6.33617.297
   Manifest Version:    16.2.462-net8-p3/8.0.100-preview.3
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100-preview.3\microsoft.net.sdk.ios\WorkloadManifest.json
   Install Type:              Msi

Host:
  Version:      8.0.0-preview.3.23174.8
  Architecture: x64
  Commit:       47bad717bd

.NET SDKs installed:
  8.0.100-preview.3.23178.7 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0-preview.3.23177.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0-preview.3.23174.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.0-preview.3.23178.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

C:\Windows\System32>

WSL Ubuntu ‘dotnet --info’

.NET SDK:
 Version:   8.0.100-preview.3.23178.7
 Commit:    e300b0e1e6

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /root/dotnet/sdk/8.0.100-preview.3.23178.7/

.NET workloads installed:
 [wasm-tools]
   Installation Source: SDK 8.0.100-preview.3
   Manifest Version:    8.0.0-preview.3.23174.8/8.0.100-preview.3
   Manifest Path:       /root/dotnet/sdk-manifests/8.0.100-preview.3/microsoft.net.workload.mono.toolchain.current/WorkloadManifest.json
   Install Type:        FileBased
 [wasm-experimental]
   Installation Source: SDK 8.0.100-preview.3
   Manifest Version:    8.0.0-preview.3.23174.8/8.0.100-preview.3
   Manifest Path:       /root/dotnet/sdk-manifests/8.0.100-preview.3/microsoft.net.workload.mono.toolchain.current/WorkloadManifest.json
   Install Type:        FileBased

Host:
  Version:      8.0.0-preview.3.23174.8
  Architecture: x64
  Commit:       47bad717bd

.NET SDKs installed:
  8.0.100-preview.3.23178.7 [/root/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.0-preview.3.23177.8 [/root/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.0-preview.3.23174.8 [/root/dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/root/dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Issue Analytics

  • State:closed
  • Created 5 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
JeepNLcommented, Apr 26, 2023

@lewing @radekdoulik It’s okay, for now I can build my Blazor WASM projects on WSL Ubuntu, which works. Only on Windows 11 it doesn’t work. I can wait for .NET 8 Preview 4.

1reaction
lewingcommented, Apr 26, 2023

It’s not your fault at all and it is possible that there is still an issue. We altered some settings in p3 that I suspect caused this and have reverted that change. If you are still having issues @radekdoulik can help you.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Urgent help with Blazor WASM Hosted. Environment is ...
I used LiveSharp for live preview and hot reloading for .NET 5. I continued normally, but using the server as the startup project....
Read more >
Blazor - Is Emcripten NuGet package intentionally missing ...
I was wondering if it is intentional that the NuGet package of Emscripten is missing the '-mt.a libs' from 'emscripten\cache\sysroot\lib\wasm32- ...
Read more >
ASP.NET Core updates in .NET 6 Release Candidate 2
Note: You may get a build error on subsequent builds saying that the output assembly is being used by another process. This is...
Read more >
WebAssembly and Blazor: A Decades Old Problem Solved
Blazor is a client-side library that uses .NET on WebAssembly to support Single Page Applications written in C# using Razor templates.
Read more >
Porting a Desktop Game Editor to the Browser with ... - InfoQ
Be sure to delete what you create - until Emscripten/wasm gets some garbage collector. Another challenge is around properly using the ...
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