I'm trying to use an external library with my code. I have added it as a reference from within Visual Studio and things like auto-complete works fine, I can see all the available methods while typing code. It also compiles without any warning or errors.
The DLL is within the same directory as the executable.
However, I get this error:
"Unhandled Exception: System.TypeInitializationException: The type initializer fo
r '<Module>' threw an exception. ---> System.DllNotFoundException: Unable to loa
d DLL 'yeppp': The specified module could not be found. (Exception from HRESULT:
0x8007007E)
at Yeppp.Library.yepLibrary_Init()
at Yeppp.Library.Init()
at .cctor()
--- End of inner exception stack trace ---"
What am I doing wrong?
http://docs.yeppp.info/cs/index.html#GettingStarted
You also need to deploy yeppp.dll as the article says.
Related
I am running a C# WinForms app. The goal of this small section of code is to copy the contents of a .JMP file into a .csv file for data manipulation. Easy enough right? I do not want to do this all in JMP or using a .jsl. The code for parsing and reformatting the data is already there for .csv files and has been working flawlessly.
The app that runs fine unless I have this one specific line that accesses the System.Windows.Clipboard class in my code:
Clipboard.SetDataObject(my data);
When I run the code with the line commented out all is well, but when I run them with the line included the app immediately goes into breakmode with these exceptions:
System.TypeInitializationException
HResult=0x80131534
Message=The type initializer for '<Module>' threw an exception.
Source=<Cannot evaluate the exception source>
StackTrace: Cannot evaluate the exception stack trace
Inner Exception 1:
ModuleLoadException: The C++ module failed to load during appdomain initialization.
Inner Exception 2:
TypeLoadException: Could not load type 'System.Windows.Media.DisableDpiAwarenessAttribute' from assembly 'WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
For Inner Exception 1, I am confused because this is a C# app in WinForms with no C++, don't know what the deal is here.
For Inner Exception 2, I am confused because the Assembly WindowsBase is for WPF and not WinForms. I am unable to even add a project reference to this WindowsBase assembly. Again, these errors only happen when I try to do anything with the System.Windows.Clipboard class.
I have downloaded, installed, and ensured the proper location of the following DLLs:
1. PresentationCore.dll
2. System.Windows.Forms.dll
Am I still missing some DLLs? Any help is appreciated.
You should use System.Windows.Forms.Clipboard instead of System.Windows.Clipboard, for the latter one is from WPF. You should remove the reference to PresentationCore.dll, because it's from WPF and not needed in WinForm.
I have site on local machine and when i try callout db.SaveChanges(), i get the error: System.Reflection.TargetInvocationException: "Exception has been thrown by the target of an invocation." Inner exception: DllNotFoundException: Unable to load DLL 'SqlServerSpatial140.dll': Single module not found. (Exception from HRESULT: 0x8007007E).
But the same code work perfect on global machine. Why i can got the error?
File that wrote in exception available.
I solved my problem. I donwload this dll files (32 bit and 64 bit) - msvcp120, sqlserverspatial140 on the site: https://www.dll-files.com/
and rewrite in the folders System32(64 bit) and SysWow64(32 bit).
When I run project in visual studio, Magick.NET v7.14.0.2 works fine but on deploying on windows server, it gives error:
Unable to load DLL 'Magick.NET-Q16-x86.Native.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Complete exception:
System.TypeInitializationException: The type initializer for 'NativeMagickSettings' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'Magick.NET-Q16-x86.Native.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E) at ImageMagick.Environment.NativeMethods.X86.Environment_Initialize() at ImageMagick.Environment.Initialize() at ImageMagick.MagickSettings.NativeMagickSettings..cctor() --- End of inner exception stack trace --- at ImageMagick.MagickSettings.NativeMagickSettings..ctor() at ImageMagick.MagickSettings..ctor() at ImageMagick.MagickImage..ctor() at projectname.controllername
I'm working on a project that requires curve-fitting. To get best results I opted to use MATLAB toolkit. I created a dll of this code and tried to use it in C# .NET framework. The dll works successfully on one system but not on any other system.
I get the following exception:
Unhandled Exception: System.TypeInitializationException: The type initializer fo
r 'curve.cfit' threw an exception. ---> System.TypeInitializationException: The
type initializer for 'MathWorks.MATLAB.NET.Utility.MWMCR' threw an exception. --
-> System.TypeInitializationException: The type initializer for 'MathWorks.MATLA
B.NET.Arrays.MWArray' threw an exception. ---> System.DllNotFoundException: Unab
le to load DLL 'mclmcrrt7_17.dll': The specified module could not be found. (Exc
eption from HRESULT: 0x8007007E)
at MathWorks.MATLAB.NET.Arrays.MWArray.mclmcrInitialize2(Int32 primaryMode)
at MathWorks.MATLAB.NET.Arrays.MWArray..cctor()
--- End of inner exception stack trace ---
at MathWorks.MATLAB.NET.Utility.MWMCR..cctor()
--- End of inner exception stack trace ---
at curve.cfit..cctor()
--- End of inner exception stack trace ---
at curve.cfit..ctor()
I wanted to know why this is happening and how I can solve this issue? I need to deploy my project on multiple machines. What should I do?
thank you in advance :)
The error tells you that the program could not find mclmcrrt7_17.dll. This is part of the MATLAB compiler runtime that you need to deploy on each target machine. It looks like you have not deployed the MATLAB compiler runtime.
The runtime redistributable file is available here: http://www.mathworks.co.uk/products/compiler/mcr/index.html
I want to use textures in opengl on my C# application.
I'm using the Tao Framework and I used this code
http://www.gamedev.net/community/for...opic_id=405453 (post #2)
But I got this runtime error:
An unhandled exception of type 'System.DllNotFoundException' occurred in WindowsFormsApplication1.exe
Additional information: Unable to load DLL 'DevIL.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Could someone help me?
Is there any other way to do this?
I had this problem with GLU.FreeGLUT.dll but when I installed Tao Framework solved my problem .
before that i copy dll to win32 and there was in dotnet Directory and add to references in project but I recieved this message : "An unhandled exception of type 'System.DllNotFoundException' "
It looks like the problem is the loading of the dll. You should make sure the dll is properly importer in your project through the references. Also make sure that you haven't moved or deleted the dll after you have added it to your project.
It suggests you are missing DevIL. Try getting it and installing it before proceeding.