Skip to content

WebAssembly Browser App project fails to run #67236

Closed

Description

@danroth27

Description

When I try to dotnet run a WebAssembly Browser App I get:

A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\WDAGUtilityAccount\Desktop\WasmBrowserApp\bin\Debug\net7.0\browser-wasm'.

Presumably this is because the app is intended to be published and run in a browser, but there should be some sort of dev experience for running the app locally.

Reproduction Steps

  • Install .NET 7 Preview 2
  • dotnet workload install wasm-tools
  • dotnet new wasmbrowser
  • dotnet run

Expected behavior

App successfully builds and runs

Actual behavior

C:\Users\WDAGUtilityAccount\Desktop\WasmBrowserApp>dotnet run
A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\WDAGUtilityAccount\Desktop\WasmBrowserApp\bin\Debug\net7.0\browser-wasm'.
Failed to run as a self-contained app.

  • The application was run as a self-contained app because 'C:\Users\WDAGUtilityAccount\Desktop\WasmBrowserApp\bin\Debug\net7.0\browser-wasm\browser.runtimeconfig.json' did not specify a framework.
  • If this should be a framework-dependent app, specify the appropriate framework in 'C:\Users\WDAGUtilityAccount\Desktop\WasmBrowserApp\bin\Debug\net7.0\browser-wasm\browser.runtimeconfig.json'.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Activity

  1. ghost added
    untriaged
    on Mar 28, 2022
  2. added
    arch-wasm
    on Mar 28, 2022
  3. self-assigned this
    on Mar 28, 2022
  4. removed
    untriaged
    on Mar 28, 2022
  5. added this to the 7.0.0 milestone on Mar 28, 2022
  6. ghost added
    in-pr
    on May 25, 2022
  7. ghost removed
    in-pr
    on May 25, 2022
  8. ghost locked as resolved and limited conversation to collaborators on Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-wasmarea-Host

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions