dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.38k stars 4.75k forks source link

migration blazor webassembly dotnet 8 to 9 #109805

Open mahdiyar021 opened 6 days ago

mahdiyar021 commented 6 days ago

Is there an existing issue for this?

Describe the bug

after updating my project with this link https://learn.microsoft.com/en-us/aspnet/core/migration/80-90?view=aspnetcore-8.0&tabs=visual-studio all my api work great but when i downloaded all assembly files. I get exception and i think the program.cs in webassembly project do not run Image

i have native c code for running sqllite in browser . also set <WasmBuildNative>true</WasmBuildNative> in project webassembly

Expected Behavior

No response

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

9.0

Anything else?

No response

lewing commented 5 days ago

cc @radekdoulik

codemahek commented 4 days ago

I am facing the same issue when migrating my application from .net 8 to .net 9.

mahdiyar021 commented 3 days ago

any update??

radekdoulik commented 1 day ago

it looks like you are missing wasm-tools workload. please install it and see whether it will solve this issue

dotnet-policy-service[bot] commented 1 day ago

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

mahdiyar021 commented 23 hours ago

I Installed wasm tool .net 9 but not .net 8 . I upgrade whole project to .net 9 . Is there any need to install .net 8 at all , also I search in all my project the is no setting to set wasm tool version. I think some exception related for installing wasm tool will be good.

radekdoulik commented 3 hours ago

what does dotnet workload list output for you in the terminal?

it should look similar to this:

> dotnet workload list                   

Installed Workload Id      Manifest Version                               Installation Source  
-----------------------------------------------------------------------------------------------
wasm-tools                 9.0.0-preview.3.24172.9/9.0.100-preview.3      SDK 9.0.100-preview.3

Use `dotnet workload search` to find additional workloads to install.

if it doesn't list wasm-tools workload, please install it with dotnet workload install wasm-tools. if you are using Visual Studio, make sure that you use the right command prompt or powershell (https://learn.microsoft.com/en-us/visualstudio/ide/reference/command-prompt-powershell?view=vs-2022).