Samsung/Tizen-CSharp-Samples

CubeWithSkiaSharp example blocked on Tizen TV

GTea3 opened this issue · 3 comments

GTea3 commented

Hi, DotnetPolicyChecker is blocking the CubeWithSkiaSharp example app from being run with a message "[FAIL] SkiaSharp.dll refers a forbidden assembly directly - libEGL.dll" on Tizen 5.0. Is there a way to resolve this issue or maybe you can suggest other high-level C# library that is capable of rendering text, isn't blocked on Tizen TV and can be used in tandem with OpenTK?

Hi GTea3, I failed to reproduce this issue on my TV,
How can I get this message "[FAIL] SkiaSharp.dll refers a forbidden assembly directly - libEGL.dll"
And What is your test environment ?
My test TV info as bellow:
root@Samsung:/# cat /etc/info.ini
[Version]
Model=Tizen5/TV;
Build=latest;
Release=latest;
[Build]
Type=eng;
Date=20190409_190547;
Time=19:05:47;
Variant=NONE;
ID=latest;

GTea3 commented

Hi, an87li. I'm running the app via Visual Studio 2017, on Tizen5/TV, Date=20190524_200827. I assume you're not using Visual Studio to start the app so DotnetPolicyChecker is not starting. From what I've found out the issue is that 3rd party apps may not include dlls that import internal libs directly and the workaround is to exclude SkiaSharp lib binaries from being deployed with the app so the app uses platform's binaries. I've modified csproj file adding <PropertyGroup><TizenTpkExcludePattern>libSkiaSharp.*</TizenTpkExcludePattern></PropertyGroup> node and modyfing SkiaSharp's PackageReference node to <PackageReference Include="SkiaSharp" Version="1.60.1"><ExcludeAssets>Runtime</ExcludeAssets></PackageReference> and now the app works.

thanks, GTea3 :)
I checked your solution, it works.
I will update the source code