I want to create a program in C# that uses OpenTK. I download the nuget package with this:
nuget.exe install OpenTK
and also
nuget.exe install OpenTK.GLControl
But whenever I reference these 2 files, the console ends up printing this error:
Exception thrown: 'System.DllNotFoundException' in OpenTK.dll
Additional information: Unable to load DLL 'libX11': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
And upon further investigation, libX11 is a Linux package but I'm running on Windows 10. Is there a way to bypass the Linux check and be able to use it on Windows?
There is no code with it because I can't even properly reference the file without it printing that exception.
I have attempted to put this into System32 and all to no avail.
Related
When publishing project to windows server 2003 (old test machine) I get following error when trying to call open cv functions.
Additional information: The type initializer for 'Emgu.CV.CvInvoke' threw an exception.Unable to load DLL 'cvextern': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
I am using EmguCV 3.4.1 version with uploaded libraries:
vcruntime140.dll
opencv_ffmpeg341.dll
msvcp140.dll
cvextern.dll
concrt140.dll
To the Emgu package nothing extra (dll's) were added and on developer machine I could develop the application.
I keep wondering whether additional native dll's should be added. I downloaded binaries for 3.4.1 version. The files go like that:
opencv_core249.dll
opencv_highgui249.dll
Those two above where in 3.4.1 package. When i copied them to program directory it didn't help either.
What's more I have no idea how to track down the problem.
Process monitor doesn't show that the process is looking for something that cannot be loaded.
In the inner exception I am given only this exception: Unable to load DLL 'cvextern': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)
I had to install "Desktop Experience" feature on my server. Because server 2003 doesn't seem to have it, I had to move it to another server 2008 host.
I have installed the latest OpenCVSharp 2 (2.4.10.201...) with the NuGet manager in my project. Everything concerning OpenCVSharp.CvMat is working OK (loading, manipulation etc) so I am sure the installation is correct.
However I cannot use OpenCVSharp.CPlusPlus at all! The problem is that it doesn't load OpenCvSharpExtern.dll.
Error shown from try-catch block:
try
{
Mat mat = new Mat();
} catch (Exception err)
{
Console.WriteLine( err );
}
System.TypeInitializationException: The type initializer for 'OpenCvSharp.CPlusPlus.Mat' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'OpenCvSharpExtern': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at OpenCvSharp.CPlusPlus.NativeMethods.core_Mat_sizeof()
at OpenCvSharp.CPlusPlus.Mat..cctor()
--- End of inner exception stack trace ---
at OpenCvSharp.CPlusPlus.Mat..ctor()
at MainClass.Main() in C:\Users\kotsias\Documents\Visual Studio 2015\Projects\MyCVSharp\ConsoleApplication1\Test.cs:line 14
The OpenCvSharpExtern.dll IS deployed alongside my .exe inside the following subfolders:
..\dll\x86
&
..\dll\x64
If I manually copy the x64 .dll in the same folder as my .exe, I still get the same error above. If I copy the x86 .dll, I get a different error:
System.TypeInitializationException: The type initializer for 'OpenCvSharp.CPlusPlus.Mat' threw an exception. ---> System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
at OpenCvSharp.CPlusPlus.NativeMethods.core_Mat_sizeof()
at OpenCvSharp.CPlusPlus.Mat..cctor()
--- End of inner exception stack trace ---
at OpenCvSharp.CPlusPlus.Mat..ctor()
at MainClass.Main() in C:\Users\kotsias\Documents\Visual Studio 2015\Projects\MyCVSharp\ConsoleApplication1\Test.cs:line 14
It is not enough installing the "OpencvSharp{version} nuget" package.
You also have to install the "OpencvSharp{version}.runtime.{operating_system}" package.
For example, in my case I had to install the following Nuget pacages:
OpencvSharp4
OpencvSharp4.runtime.win
Another issue that some may be hitting:
OpenCvSharpExtern.dll requires mfplat.dll that is part of the Media Feature Pack. Windows 'N' editions do not include this by default.
It can be installed from Apps and Features->Optional features->Add a feature.
Probably you don't have correct version of Visual C++ Redistributable package installed.
OpenCvSharp 2.4.10 uses Visual C++ 2013 Redistributable Package. However, OpenCvSharp 2.4.10 is deprecated and author recommends to use OpenCvSharp 3.2:
#OpenCvSharp 2.4.10 Cross platform wrapper of OpenCV 2.4.10 for .NET Framework.
This project is deprecated. The latest release is available in OpenCvSharp.
For more information check:
Unable to load DLL (Module could not be found HRESULT: 0x8007007E) discussion
Why Are There So Many “Microsoft Visual C++ Redistributables” Installed on My PC? article
OpenCvSharp 3.2 NuGet page.
Use this code on Package manager :
Install-Package OpenCvSharp4.Windows -Version 4.0.0.20190108
I was having this problem in production (After Creating the Setup File and Installing it). I've solved it by doing the following steps
Installed the OpenCVSharp Through NuGet Packages
Setting the Platform Target to X64 in Project Properties
Creating the Setup File with the same Platform
Manually Copying the "packages\OpenCvSharp4.runtime.win.4.5.3.20210817\runtimes\win-x64\native\OpenCvSharpExtern.dll" file into the installation directory.
I need to create a Custom Download Manager, because I don't want the Internet Explorer to fire de Default File Download Dialog.
Then, I got this example to do: http://www.codeproject.com/Articles/18935/The-most-complete-C-Webbrowser-wrapper-control
I've downloaded the example code and tried to run it. after registering the DLL the program didn't recognize. The whole problem is the x64 and x86 bits thing. I work on a x64 bits machine, and it doesn't work
Then I got this post: wrap 32 bit dll for 64 bit operating system to work with regsvr32.exe
and tried the solutions, but the same exception was still there.
Exception:
An unhandled exception of type 'System.UnauthorizedAccessException' occurred in csExWB.dll
Additional information: Access denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
I really need your help, and don't know what else to do. This download manager is vital to my project.
I appreciate any help.
I am building a Windows Store app that targets an ARM device (Windows RT tab), I installed the NuGet pkg SQLite-net and it works perfectly under x86 platform. But when I tested on the ARM device (note that platform target has been setup for ARM by this time), I get the following error:
An exception of type 'System.DllNotFoundException' occurred in
App1.exe but was not handled in user code
Additional information: Unable to load DLL 'sqlite3': The specified
module could not be found. (Exception from HRESULT: 0x8007007E)
I have not been able to add the sqlite3.dll from the SQLite.org website, I tried to add as a "existing item", change its properties as content, copy always; but I keep getting the same error.
my Connection path is following:
// C#
public static string sqlitedbPath = Path.Combine(
Windows.Storage.ApplicationData.Current.LocalFolder.Path, "mydb.s3db");
I am sure I have the wrong DLL, but I am having I hard time to change it.
Does somebody has a good solution?
I have a project that was built in Visual Studio 2005 in C#. I created an installer for the Windows application (in VS2010) and it installs and works fine on Windows XP SP3. I tried installing it on Windows 7 32-bit and it says installation is successful but when I try to open the application I receive this error message:
A fatal error has occurred. Unable to load DLL 'VistaDb20.dll': Invalid
access to memory location. (Exception from HRESULT: 0x800703E6)
People suggested I run this in the command line:
regsvr32 VistaDb20.dll
I get the error message:
The module "VistaDb20.dll" was loaded but the
entry-point DllRegisterServer was not found.
Make sure that "VistaDb20.dll" is a valid DLL or OCX
file and then try again.
So then I tried regasm VistaDb20.dll /tlb:VistaDb20.tlb using the .NET Framework Assembly Registration Utility 2.0.50727.4927 and get error:
RegAsm : error RA0000 : Failed to load 'VistaDb20.dll' because it is not a valid .NET assembly.
I am not sure how to get my application running on Windows 7 with this .dll problem. Any help would be appreciated. This application and the database was created using VistaDB 2.1
I guess I can't change the actual dll since I did not create it but maybe I have to change some properties of the dll in Visual Studio?
I had this error while trying to registering my VB .NET assembly using RegAsm command:
RegAsm : error RA0000 : Failed to load 'VistaDb20.dll' because it is not a valid .NET assembly.
I solved the problem buy executing RegAsm of the right .NET Framework.
I mean you should use the tools of the same Framework that you make as target in your advanced options of compilation (VS2010).
According to this your problem is that this DLL is not compatible with DEP. You'll need to disable DEP to workaround this but in the long term you should try to wean yourself off this particular dependency.