-
Notifications
You must be signed in to change notification settings - Fork 543
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
[BUG] Native library missing on Xamarin.Mac Full #913
Comments
I believe this is a duplicate of #736 |
|
Thanks for you response Matthew, I have extracted the exception from ~/Library/Logs/VisualStudio/8.0/Ide.2019-07-22__09-01-53.log file :
|
Since VS for Mac is not ready to target Xamarin.Mac.NET yet, I will use this ugly workaround for now: add the libSkiaSharp.dylib in my main project as "Content". The library will be copy in bundle after compilation in the correct folder to be loaded by SkiaSharp.dll |
It is a tad bit disappointing. But the workaround to add the .dylib should do it for the time being. I'll have a look at the targets file - I may be able to tweak a few lines to copy this in if it detects the full framework. Just a link to the info about the support: NuGet/NuGet.Client#2572 (comment) |
Description
Application crash on SKBitmap creation with a DllNotFoundException in inner exception :
System.TypeInitializationException: The type initializer for 'SkiaSharp.SKImageInfo' threw an exception. ---> System.DllNotFoundException: libSkiaSharp
at at (wrapper managed-to-native) SkiaSharp.SkiaApi.sk_colortype_get_default_8888()
at SkiaSharp.SKImageInfo..cctor () [0x00000] in :0
--- End of inner exception stack trace ---
at at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_generic_class_init(intptr)
at SkiaSharp.SKBitmap..ctor (System.Int32 width, System.Int32 height, System.Boolean isOpaque) [0x00000] in :0
at TestSkia.MainClass.Main (System.String[] args) [0x00001] in /Users/christophe/Projects/TestSkia/TestSkia/Main.cs:10
Code
`namespace TestSkia
{
static class MainClass
{
static void Main(string[] args)
{
new SKBitmap(10, 10);
}
`
Expected Behavior
Output directory should contains libSkiaSharp.dylib (native Skia library for OSX)
Actual Behavior
Output directory contains x86/libSkiaSharp.dll and x64/libSkiaSharp.dll, which are native library for Windows and not OSX
Basic Information
The text was updated successfully, but these errors were encountered: