Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run WebAssembly Browser App from VS or CLI #75356

Closed
danroth27 opened this issue Sep 9, 2022 · 9 comments · Fixed by #75384
Closed

Unable to run WebAssembly Browser App from VS or CLI #75356

danroth27 opened this issue Sep 9, 2022 · 9 comments · Fixed by #75384
Assignees
Labels
Milestone

Comments

@danroth27
Copy link
Member

Description

I'm unable to run a new WebAssembly Browser App from VS or the CLI.

Reproduction Steps

dotnet workload install wasm-experimental
dotnet new wasmbrowser
dotnet run

Or create the project from VS and try to run in VS.

Expected behavior

App runs successfully

Actual behavior

The application to execute does not exist: 'C:\Program'

Regression?

No response

Known Workarounds

No response

Configuration

7.0.100-rc.1.22429.3
VS 17.4 P1

Other information

No response

@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@lewing lewing added the arch-wasm WebAssembly architecture label Sep 9, 2022
@ghost
Copy link

ghost commented Sep 9, 2022

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

Issue Details

Description

I'm unable to run a new WebAssembly Browser App from VS or the CLI.

Reproduction Steps

dotnet workload install wasm-experimental
dotnet new wasmbrowser
dotnet run

Or create the project from VS and try to run in VS.

Expected behavior

App runs successfully

Actual behavior

The application to execute does not exist: 'C:\Program'

Regression?

No response

Known Workarounds

No response

Configuration

7.0.100-rc.1.22429.3
VS 17.4 P1

Other information

No response

Author: danroth27
Assignees: pavelsavara
Labels:

arch-wasm, untriaged

Milestone: -

@lewing lewing added this to the 7.0.0 milestone Sep 9, 2022
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@lewing lewing added untriaged New issue has not been triaged by the area owner area-Infrastructure-mono labels Sep 9, 2022
@ghost
Copy link

ghost commented Sep 9, 2022

Tagging subscribers to this area: @directhex
See info in area-owners.md if you want to be subscribed.

Issue Details

Description

I'm unable to run a new WebAssembly Browser App from VS or the CLI.

Reproduction Steps

dotnet workload install wasm-experimental
dotnet new wasmbrowser
dotnet run

Or create the project from VS and try to run in VS.

Expected behavior

App runs successfully

Actual behavior

The application to execute does not exist: 'C:\Program'

Regression?

No response

Known Workarounds

No response

Configuration

7.0.100-rc.1.22429.3
VS 17.4 P1

Other information

No response

Author: danroth27
Assignees: pavelsavara
Labels:

arch-wasm, untriaged, area-Infrastructure-mono

Milestone: 7.0.0

@lewing lewing removed the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@lewing lewing assigned maraf and unassigned pavelsavara Sep 9, 2022
@radical
Copy link
Member

radical commented Sep 9, 2022

Fix is being backported for rc2: #75295

@lewing
Copy link
Member

lewing commented Sep 9, 2022

With that fix


A fatal error was encountered. The library 'hostpolicy.dll' required to execute the application was not found in 'C:\Users\daroth\source\repos\WasmBrowserApp\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\daroth\source\repos\WasmBrowserApp\WasmBrowserApp\bin\Debug\net7.0\browser-wasm\WasmBrowserApp.runtimeconfig.json' did not specify a framework.  - If this should be a framework-dependent app, specify the appropriate framework in 'C:\Users\daroth\source\repos\WasmBrowserApp\WasmBrowserApp\bin\Debug\net7.0\browser-wasm\WasmBrowserApp.runtimeconfig.json'.

@lewing
Copy link
Member

lewing commented Sep 9, 2022

@thaystg can you take a look?

@lewing lewing assigned thaystg and unassigned maraf Sep 9, 2022
@radical
Copy link
Member

radical commented Sep 9, 2022

Looks like it is not running the WasmAppHost, and instead trying to find an apphost as it normally would. @thaystg do confirm the $(RunArguments) are correct. You can also try running the command manually to check that it isn't something else.

@danroth27
Copy link
Member Author

Once build and run from VS and the CLI Just Works:tm: do we still need the README? The README could use some cleanup, or maybe it could just be removed.

Some suggested README updates if we want to keep it:

image

.NET WebAssembly Browser app

Build

You can build the app from Visual Studio or from the command-line:

dotnet build -c Debug/Release -r browser-wasm

After building the app, the result is in the bin/$(Configuration)/net7.0/browser-wasm/AppBundle directory.

Run

You can build the app from Visual Studio or the command-line:

dotnet run -c Debug/Release -r browser-wasm

Or you can start any static file server from the AppBundle directory:

dotnet tool install dotnet-serve
dotnet serve -d:bin/$(Configuration)/net7.0/browser-wasm/AppBundle

@danroth27
Copy link
Member Author

It would also be great if the displayed app URLs on the command line used "localhost" instead of 127.0.0.1. Otherwise, I don't think the ASP.NET Core dev certificate gets used and user can get HTTPS errors in the browser. Let me know if you want me to open separate issues for this feedback.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 10, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 14, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants