question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Question: copy bundled libvips to another directory

See original GitHub issue

Is there possibility to set the directory for bundled libvips before runtime? I don’t want to have all the dll’s in my working directory, I’d prefer something like “Release/vips/”.

<UseGlobalLibvips>true</UseGlobalLibvips>
<LibvipsDLLPath>C:\vips-dev-w64-web\bin</LibvipsDLLPath>

This just copies the vips in selected directory to the output directory. I can’t set EnvironmentVariable this way:

private static void SetVipsPath()
{
    string executingAssemblyFile = Assembly.GetExecutingAssembly().GetName().CodeBase.Replace("file:///", null);
    string executingDirectory = Path.GetDirectoryName(executingAssemblyFile);
    string vipsPath = $"{Path.Combine(executingDirectory, "vips")};";
    Environment.SetEnvironmentVariable("PATH", vipsPath);
}

either, because libvips’s Initializer is called before runtime and throws exception because can’t find libvips in my output directory.

Thanks in advance for your reply!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:18 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
kleisaukecommented, Dec 2, 2018

Thanks for testing! I’ll publish a new version (1.0.6) on NuGet with this improvement in the course of next week.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Adding libvips to a Rails 7 Docker image
I'm new to Docker and trying to create a Dockerfile for this new Rails 7 app. I'm using vips instead of imagemagick for...
Read more >
I can't open my project - Crash while consolidating
Hi, I recently had to change my computer and I moved all my Tropy projects to the new one. I replicated the exact...
Read more >
Jemalloc error on new app - Questions / Help
Hi, I've been trying to deploy an app and I keep seeing this in the logs and on ssh ERROR: ld.so: object ...
Read more >
How to Fix NPM Sharp Command Failed error
Guide on troubleshooting failing NPM install of Sharp with the command failed error!
Read more >
VipsImage
A fast image processing library with low memory needs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found