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

Empty project does not run in NET 9 WebAssembly on browser #17896

Open
fraluderin opened this issue Jan 6, 2025 · 3 comments
Open

Empty project does not run in NET 9 WebAssembly on browser #17896

fraluderin opened this issue Jan 6, 2025 · 3 comments
Labels

Comments

@fraluderin
Copy link

Describe the bug

An empty project created with VS 2022 fails to load in browser WebAssembly if targeting NET 9.

To Reproduce

  1. Create a new VS 2022 solution using template "Avalonia Cross Platform Application"

image

  1. Select NET 9 as target framework.

image

  1. Build the solution and try to run Browser application. The app loads but remains stuck in splashscreen.

image

  1. Inspecting with dev tools reveals some errors.

image

Expected behavior

The app should load as expected; the same project starts to work if target framework is changed to NET 8 on all projects.

Avalonia version

11.2.1

OS

Windows

Additional context

These are the SDKs I have:

image

NET 8 and NET 9 WebAssembly build tools are installed:

image

@fraluderin fraluderin added the bug label Jan 6, 2025
@timunie
Copy link
Contributor

timunie commented Jan 6, 2025

Have you tried dotnet workload restore?

@fraluderin
Copy link
Author

fraluderin commented Jan 6, 2025

@timunie Just tried that, unfortunately it did not work. I ran it both in project (VS Dev PowerShell) and in Windows cmd prompt.

@stevemonaco
Copy link
Contributor

Hmm, Browser worked fine for me a week or two ago for me when I tried it from a fresh install with a fresh project. I did create with 11.2.3 (you can type this into the template wizard) and only have 9.0.101 SDK.

My dotnet workload list shows:

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------------------
android                    35.0.24/9.0.100        SDK 9.0.100, VS 17.12.35527.113
aspire                     8.2.2/8.0.100          SDK 9.0.100, VS 17.12.35527.113
ios                        18.2.9170/9.0.100      SDK 9.0.100, VS 17.12.35527.113
maccatalyst                18.2.9170/9.0.100      VS 17.12.35527.113
maui-windows               9.0.0/9.0.100          VS 17.12.35527.113
wasm-tools                 9.0.0/9.0.100          SDK 9.0.100

IIRC, I installed via CLI instead of VS: dotnet workload install wasm-tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants