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

Native dll is missing in the AnyCPU nuget package in version 7.14.0 #467

Closed
3 tasks done
hermanho opened this issue Jun 20, 2019 · 12 comments
Closed
3 tasks done

Native dll is missing in the AnyCPU nuget package in version 7.14.0 #467

hermanho opened this issue Jun 20, 2019 · 12 comments
Labels
Milestone

Comments

@hermanho
Copy link

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am using the latest version of Magick.NET
  • I have searched open and closed issues to ensure it has not already been reported

Description

The native dll is missing in AnyCPU package comparing with x64 version.

  • Magick.NET version:
  • Environment (Operating system, version and so on): windows 10
  • Additional information:

Magick.NET-Q16-AnyCPU nuget package
image

Magick.NET-Q16-x64 nuget package
image

@dlemstra
Copy link
Owner

As you can read in docs/Readme.md the library is included as an embedded resource. So it is correct that you cannot find it in the NuGet package.

@hermanho
Copy link
Author

When I install with Magick.NET-Q16-AnyCPU-7.14.0 nuget package, it throw with the following exception:

The type initializer for 'NativeMagickSettings' threw an exception. Unable to load DLL 'Magick.Native-Q16-x64.dll' or one of its dependencies: The specified module could not be found. (Exception from HRESULT: 0x8007007E) 

System.TypeInitializationException:
   at ImageMagick.MagickSettings+NativeMagickSettings..ctor (Magick.NET-Q16-AnyCPU, Version=7.14.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec)
   at ImageMagick.MagickSettings..ctor (Magick.NET-Q16-AnyCPU, Version=7.14.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec)
   at ImageMagick.MagickImage..ctor (Magick.NET-Q16-AnyCPU, Version=7.14.0.0, Culture=neutral, PublicKeyToken=2004825badfa91ec)

However, it is no problem when I install with Magick.NET-Q16-x64-7.14.0 nuget package only means it does not work without runtimes folders.

@dlemstra
Copy link
Owner

dlemstra commented Jun 20, 2019

It looks like your application cannot create the folder for the embedded resources in %temp%. Have you tried setting MagickAnyCPU.CacheDirectory?

@hermanho
Copy link
Author

I tried with MagickAnyCPU.CacheDirectory = "C:\temp\" and everyone with full permission. There is no files outputted in that folder. When I step in with source code, the method "NativeLibraryLoader.Load" has not called so the embedded resource has not extracted.

@dlemstra
Copy link
Owner

Are you using the .netstandard2.0 version of the library or the net4.0 one?

@hermanho
Copy link
Author

netstandard2.0, my project is asp.net core 2.2 and targetFramework is netcoreapp2.2

@dlemstra
Copy link
Owner

Then you will need to switch to the x64 version. At this moment there is no AnyCPU support for the netstandard2.0 build.

@hermanho
Copy link
Author

It is breaking change! It works on Magick.NET-Q16-AnyCPU v7.13.1 but developers have to install x64 version when v7.14.0.

@dlemstra
Copy link
Owner

That was never my intention but I will take a look at this later tonight to confirm this.

@dlemstra dlemstra reopened this Jun 20, 2019
@dlemstra
Copy link
Owner

Well it looks like you are right. It seems that I added support for the AnyCPU build for all platforms at some point in time. I really don't remember that I did this. But I will make sure I will publish a new release this weekend or next week to resolve your issue. Thanks for reporting this 👍

@ffMathy
Copy link

ffMathy commented Jun 21, 2019

Is this on NuGet yet? Also, when was this bug introduced - what version can I roll back to to fix it?

@dlemstra
Copy link
Owner

If you would read this issue you can get all the information that you are asking?

@dlemstra dlemstra added bug and removed question labels Jun 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants