0

I'm trying to use the NetVips library in my VB.NET project, i've added the NetVips.Native.win-x86 in my project from NuGet, the issue is that instead of adding the reference to the Bin folder it's add the NetVips.Native.win-x86 in a folder inside bin called packages and when i'm trying to reference to the library methods in the project i'm unable to...

enter image description here

And if i try manually to add the references to all the NetVips dll i get the error that it's unable to reach assembly or COM.

So how can i make NetVips work?

NiceToMytyuk
  • 3,644
  • 3
  • 39
  • 100

1 Answers1

2

It is normal behavior.

The NetVips.Native.win-x86 nuget package's runtimes folder's dlls are not the type of COM. Only COM dlls can be referenced under the project. They are native binaries.

enter image description here

And these three dlls are not for assembly references from the author's design.

And that is the folder runtimes folder's function. See this document.

These three dlls from the runtimes folder provide the necessary services for your application when your project is running and deployed. It is just that these three dlls are not the type of COM, which caused your problem.

Instead, you should use NetVips nuget package. The dlls from it are the type of COM. And you can use it.

Update

use Release mode, then move dlls like libvips-42.dll ... from runtimes folder into bin folder, get it.

Sara Liu - MSFT
  • 6,007
  • 1
  • 21
  • 27
  • My purpose is to use the [NetVips](https://www.nuget.org/packages/NetVips/) but it depends of libvips-42.dll which is not provided with that package, anyway i solved by moving the dlls from runtimes to bin and it solved the issue in release – NiceToMytyuk Apr 16 '21 at 15:26
  • Well. Thanks for your feedback. Be glad to know that you have solved your issue by yourself. And I have added your workaround into my answer and you can check it. Anyway, have a nice day! – Sara Liu - MSFT Apr 19 '21 at 07:31