Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Usage in Visual Studio 2015 Unit Test Project

$
0
0

Hi. I created an x64 console application in VS2015 to try out the SkiaSharp nugget package. No problem.

But if I create a unit test project, the simplest of tests using SkiaSharp causes an exception. The message shown in the test result pane is

Test Outcome: Failed
Test Duration: 0:00:00.0388023

Result StackTrace:
at SkiaSharp.SkiaApi.sk_filestream_new(String path)
at SkiaSharp.SKFileStream..ctor(String path)
at SkiaSharp.SKBitmap.Decode(String filename)
at BCA.Imaging.ImageHelper.TestSaveScaledImage() in C:\Users\Mike\Documents\Visual Studio 2015\Projects\ImagingLibrariesEvaluation\Imaging\ImageHelper.cs:line 15
at ImagingUnitTest.ImagingUnitTests.TestSkiaConcurrency() in C:\Users\Mike\Documents\Visual Studio 2015\Projects\ImagingLibrariesEvaluation\ImagingUnitTest\ImagingUnitTests.cs:line 33
Result Message:
Test method ImagingUnitTest.ImagingUnitTests.TestSkiaConcurrency threw exception:
System.DllNotFoundException: Unable to load DLL 'libSkiaSharp.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

although the output of the Tests window is slightly different:
------ Run test started ------
System.ArgumentNullException: Value cannot be null.
at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKFileStream.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken)
at SkiaSharp.SKObject.Dispose(Boolean disposing)
at SkiaSharp.SKFileStream.Dispose(Boolean disposing)
at SkiaSharp.SKNativeObject.Finalize()
========== Run test finished: 1 run (0:00:00.2200161) ==========

Do you know of any workaround? I really need to get a unit test project up and running to convince my manager (and demonstrably so) that SkiaSharp is going to be reliable in a multithreaded environment, for example ASP.Net.

Thanks


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>