Fix wasm deployment issue (#827)

* fix: update wasm-tools installation

* fix: add TrimmerRootAssembly for WASM optimization

* fix: update project to target .NET 10 and adjust deployment settings

* fix: add TrimmerRootAssembly for Ursa.Demo to improve WASM optimization

* fix: avoid Window based dialog crash on non-supported platforms.
This commit is contained in:
Dong Bin
2025-11-17 11:24:07 +08:00
committed by GitHub
parent 1cf920afa8
commit a4906d5130
5 changed files with 29 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk.WebAssembly">
<PropertyGroup>
<TargetFramework>net8.0-browser</TargetFramework>
<TargetFramework>net10.0-browser</TargetFramework>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Nullable>enable</Nullable>
@@ -9,9 +9,15 @@
<ItemGroup>
<AvaloniaResource Include="Assets\**"/>
</ItemGroup>
<ItemGroup>
<TrimmerRootAssembly Include="Ursa.Demo" />
<TrimmerRootAssembly Include="Ursa.Demo.Browser" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Browser" Version="$(AvaloniaVersion)"/>
<PackageReference Include="SkiaSharp.NativeAssets.WebAssembly" Version="3.119.1" />
</ItemGroup>
<ItemGroup>