libhostpolicy.dylib not found on start of standalone Blazor WASM project in VS Code on macOS
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 196
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Describe the bug
Hi.
I've encountered an issue that I can't figure out. I've got a barebones sample repo [here](https://github.com/aspeckt-112/aspire-blazor-wasm-frontend-example).
I have a requirement to serve a standalone Blazor WASM application - not an API project that also serves the WASM - just a standalone WASM application.
In the project that I'm working on, I'm using Aspire, I've got a couple of database containers, the backend (which I don't control) running in a container, and a standalone Blazor WASM app. The example is a much stripped down version of this, but it demonstrates the issue.
If you run the example project's AppHost via `dotnet run` - it launches fine. Everything works, you can navigate to the site. If you launch it via Rider - same behavior - it launches fine, you can navigate to the site. I don't have access to Visual Studio on Windows to test it with.
In VS Code, using `1.0.2` of the Aspire plugin and `1.90.2` of the C# Dev Kit, the `webfrontend` project will fail to start with the following error:
```
2026-01-18T19:33:18.6900000Z A fatal error was encountered. The library 'libhostpolicy.dylib' required to execute the application was not found in '/Users/russell/src/aspire-blazor-wasm-frontend-example/BlazorWasmStandalone/bin/Debug/net10.0/'.
2026-01-18T19:33:18.6900000Z Failed to run as a self-contained app.
2026-01-18T19:33:18.6900000Z - The application was run as a self-contained app because '/Users/russell/src/aspire-blazor-wasm-frontend-example/BlazorWasmStandalone/bin/Debug/net10.0/BlazorWasmStandalone.runtimeconfig.json' did not specify a framework.
2026-01-18T19:33:18.6900000Z - If this should be a framework-dependent app, specify the appropriate framework in '/Users/russell/src/aspire-blazor-wasm-frontend-example/BlazorWasmStandalone/bin/Debug/net10.0/BlazorWasmStandalone.runtimeconfig.json'.
```
Please let me know If you require any additional information or replication steps.
Cheers!
### Expected Behavior
The frontend project will start and run without error, as it does when using the dotnet CLI or Rider.
### Steps To Reproduce
I've attached a sample repo showing the problem [here](https://github.com/aspeckt-112/aspire-blazor-wasm-frontend-example).
### Exceptions (if any)
_No response_
### .NET Version info
.NET SDK:
Version: 10.0.100
Commit: b0f34d51fc
Workload version: 10.0.102
MSBuild version: 18.0.2+b0f34d51f
Runtime Environment:
OS Name: Mac OS X
OS Version: 26.2
OS Platform: Darwin
RID: osx-arm64
Base Path: /usr/local/share/dotnet/sdk/10.0.100/
.NET workloads installed:
[wasm-tools]
Installation Source: SDK 10.0.100
Manifest Version: 10.0.102/10.0.100
Manifest Path: /usr/local/share/dotnet/sdk-manifests/10.0.100/microsoft.net.workload.mono.toolchain.current/10.0.102/WorkloadManifest.json
Install Type: FileBased
Configured to use workload sets when installing new manifests.
Host:
Version: 10.0.0
Architecture: arm64
Commit: b0f34d51fc
.NET SDKs installed:
9.0.305 [/usr/local/share/dotnet/sdk]
10.0.100-rc.1.25451.107 [/usr/local/share/dotnet/sdk]
10.0.100-rc.2.25502.107 [/usr/local/share/dotnet/sdk]
10.0.100 [/usr/local/share/dotnet/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 9.0.9 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-rc.1.25451.107 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0-rc.2.25502.107 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 9.0.9 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-rc.1.25451.107 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0-rc.2.25502.107 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Microsoft.NETCore.App 10.0.0 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
Other architectures found:
None
Environment variables:
Not set
### Anything else?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.