-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
[net6.0][BlazorWasmSdk] build does not link native files #56783
Comments
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. |
Could anyone take a look into it? At least asign it to arch-wasm? thanks |
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. |
Thanks for contacting us. I believe this is being fixed already. @lewing do you have an existing issue tracking the resolution? |
1 similar comment
Thanks for contacting us. I believe this is being fixed already. @lewing do you have an existing issue tracking the resolution? |
Tagging subscribers to this area: Issue DetailsBlazor WASM SDK only links native libraries on I've been playing with 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>
|
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsBlazor WASM SDK only links native libraries on I've been playing with 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>
|
Changes have merged, but waiting to test that with VS before closing this. |
@radical did you test it linking a native library? Usint latest VS2022, and a vanilla client blazor app linking a native library, I'm getting the following error: |
The latest bits with these changes are not in the VS preview yet. You need to install the latest rc2 sdk from https://github.com/dotnet/installer . And then install the |
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:
The text was updated successfully, but these errors were encountered: