Skip to content

Commit

Permalink
possible native assets requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
beto-rodriguez committed Jan 7, 2025
1 parent 5231d96 commit 91168d2
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions samples/BlazorSample/BlazorSample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,19 @@
<ProjectReference Include="..\ViewModelsSamples\ViewModelsSamples.csproj" />
</ItemGroup>

<!--
from:
https://github.com/mono/SkiaSharp/blob/main/binding/IncludeNativeAssets.SkiaSharp.targets#L77C3-L82C15
<!-- ToDo: https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/blazor/webassembly-native-dependencies.md#package-native-dependencies-in-a-nuget-package -->
<ItemGroup>
<NativeFileReference Include="$(HarfBuzzSharpStaticLibraryPath)\2.0.23\*.a" />
note:
not completely sure if this is still needed, but in older versions of SkiaSharp
it was needed to include the native assets when publishing the app
-->
<ItemGroup Condition="('$(UsingMicrosoftNETSdkBlazorWebAssembly)' == 'true' or '$(UsingMicrosoftNETSdkWebAssembly)' == 'true') and '$(TargetFrameworkVersion)' != ''">
<NativeFileReference Include="$(MSBuildThisFileDirectory)..\output\native\wasm\libSkiaSharp.a\2.0.23\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '6.0'))" />
<NativeFileReference Include="$(MSBuildThisFileDirectory)..\output\native\wasm\libSkiaSharp.a\3.1.12\$(_SkiaSharpNativeBinaryType)\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '7.0'))" />
<NativeFileReference Include="$(MSBuildThisFileDirectory)..\output\native\wasm\libSkiaSharp.a\3.1.34\$(_SkiaSharpNativeBinaryType)\*.a" Condition="$([MSBuild]::VersionEquals($(TargetFrameworkVersion), '8.0'))" />
<NativeFileReference Include="$(MSBuildThisFileDirectory)..\output\native\wasm\libSkiaSharp.a\3.1.56\$(_SkiaSharpNativeBinaryType)\*.a" Condition="$([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), '9.0'))" />
</ItemGroup>

</Project>

0 comments on commit 91168d2

Please sign in to comment.