Skip to content
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

dotnet publish #430

Closed
OpenSpacesAndPlaces opened this issue Jan 19, 2018 · 3 comments
Closed

dotnet publish #430

OpenSpacesAndPlaces opened this issue Jan 19, 2018 · 3 comments

Comments

@OpenSpacesAndPlaces
Copy link

OpenSpacesAndPlaces commented Jan 19, 2018

Hi!

We've been using skiasharp dotnet core 2.0 and it's been working great localhost on Windows via VisualStudio.

However, when running a dotnet publish to a IIS 7.5 machine - it doesn't want to fire up:
The type initializer for 'SkiaSharp.SKManagedStream' threw an exception.Unable to load DLL 'libSkiaSharp': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

I can see "SkiaSharp.dll" in the root of the publish directory.
I can see "libSkiaSharp.dll" in "\runtimes\win7-x64\native" and \runtimes\win7-x86\native"

I have 2017 x64 C++ redistributable installed on the target machine:
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads

I tried with and without a run-time specifier of "win-x64" - no difference.
Is there another file or path that should be included in the publish settings to make this work?

Thanks in advance for the help.

@OpenSpacesAndPlaces
Copy link
Author

With a run-time specifier of "win7-x64", "libSkiaSharp.dll" copies correctly but that causes other problems.

This previous post seems to suggest the AnyCPU default should work?
#44

Right now I'm manually including the "win7-x64" copy of the "libSkiaSharp.dll", but given that the publish process has the needed files sitting in "\runtimes\win7-x64\native" and \runtimes\win7-x86\native" - shouldn't it be able to just pick one automatically or is there some way to can tell it just force copying the x64 version?

@mattleibow
Copy link
Contributor

You have to use the VS2015 VCRT Redist:
https://www.microsoft.com/en-us/download/details.aspx?id=48145

@OpenSpacesAndPlaces
Copy link
Author

OpenSpacesAndPlaces commented Jan 22, 2018

@mattleibow

You have to use the VS2015 VCRT Redist:

VS2015 must have already been installed then.

If it wasn't clear from my second post, the issue was that I have to set the build environment to "win7-x64" for the file to be copied, but if I leave as "AnyCPU" or even just generic win64 "win-x64", then "libSkiaSharp.dll" doesn't copy to the publish root from the runtimes folder.

My current fix was to just leave a static copy of "libSkiaSharp.dll" in the folder root.

@ghost ghost locked as resolved and limited conversation to collaborators Aug 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants