-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Milestone
Description
Blazor WASM SDK only links native libraries on dotnet publish, so it is not possible to debug the solution while using native linking. The reason is that emscripten targets seems to be only executed on publish.
I've been playing with WasmBuildAppAfterThisTarget property but no luck.
How could I link native files on dotnet build?
Sample csproj:
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<WasmBuildNative>true</WasmBuildNative>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="6.0.0-rc.1.21376.14" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="6.0.0-rc.1.21376.14" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<UsingBrowserRuntimeWorkload>true</UsingBrowserRuntimeWorkload>
<!-- <WasmBuildAppAfterThisTarget>Build</WasmBuildAppAfterThisTarget> -->
<WasmBuildNative>true</WasmBuildNative>
</PropertyGroup>
<ItemGroup>
<NativeFileReference Include="libTest.o" ScanForPInvokes="true" />
</ItemGroup>
</Project> Reactions are currently unavailable