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.
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.
Using the tutorial from the developers at Microsoft, I followed the tutorial created at https://learn.microsoft.com/en-us/dotnet/machine-learning/tutorials/object-detection-onnx.
I made sure to install CUDA V10.1.243 and cuDNN 7.6.5 from Nvidia's site.
Yet somehow, even after copying the entire contents of C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin to my project binary's directory at machinelearning-samples\samples\csharp\end-to-end-apps\ObjectDetection-Onnx\OnnxObjectDetectionApp\bin\Debug\netcoreapp3.0, I keep running into the following error while compiling the example program MS provided: Exception thrown: 'System.DllNotFoundException' in System.Private.CoreLib.dll An exception of type 'System.DllNotFoundException' occurred in System.Private.CoreLib.dll but was not handled in user code Unable to load DLL 'onnxruntime' or one of its dependencies: The specified module could not be found. (0x8007007E).
This should make sure they are accessible from the PATH right? I'm also including their original location in NVIDIA GPU Toolkit in the system PATH as well. I am using the latest version of Visual Studio 2019 to load and compile this solution. Is there anyone out there that has been able to run this code successfully, and if so, how?
I'm working on programming a winform app using the google apis. I just added the youTube v3 api, and now I'm getting the error:
An unhandled exception of type 'System.TypeInitializationException'
occurred in Google.Apis.Auth.dll
Additional information: The type initializer for
'Google.Apis.Json.NewtonsoftJsonSerializer' threw an exception.
And the inner exception is:
{"Could not load file or assembly 'Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)":"Newtonsoft.Json, Version=7.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed"}
I've been trying to fix this for an hour, so any suggestions are appreciated.
I'm using the latest version of all the NuGet packages, no updates are available.
The apis I'm using are:
https://www.nuget.org/packages/Google.Apis.Drive.v2/
https://www.nuget.org/packages/Google.Apis.YouTube.v3/
I found the answer, I had accidentally deleted the reference to the Newtonsoft.Json package, and when I added it back in I somehow selected an older version from a different project's packages instead of my projects packages.
Once I added the correct dll from my current project packages, it all worked fine.
I had this error. I was using Visual Studio 2017 and I had the current version (at the time) of Newtonsoft.Json installed (11.0.2). When I installed the current version of the Google.Apis (1.35.1), I received the error "The type initializer for 'Google.Apis.Json.NewtonsoftJsonSerializer' threw an exception". When looking at the inner exception information I found that the Google.Apis was expecting Newtonsoft.Json version 10. I removed Newtonsoft and Google.Apis and then reinstalled google.apis via nuget. Version 10 of Newtonsoft.Json was also installed automatically and the error went away.
If anyone is also having this error, make sure the version of Newtonsoft that is expected by Google.Apis is actually installed.
I try use this tutorial to create in C# DLL and use it in C++, but example don't work.
Always getting error:
"An unhandled exception of type
'System.Runtime.InteropServices.SEHException' occurred in
CPPClient.exe Additional information: External component has thrown an
exception."
Now my question is: How to right load managed DLL in c++? (links, tutorials, advice in that field will be appreciate)
I'm trying to use ILMerge to combine my C# program with 3 referenced DLL's. If I run the program without merging them, everything runs well but when I merge them I get the "Void System.Threading.Monitor.Enter" Error.
Here are the DLL's I am combining:
HTMLAgilityPack.dll
MySql.Data.dll
RKLib.ExportData.dll
The error appears to be coming from the MySql.Data.dll but I am not really sure why it would throw this exception.
Any ideas much appreciated.
EDIT: Full error I am receiving is:
************** Exception Text **************
System.MissingMethodException: Method not found: 'Void System.Threading.Monitor.Enter(System.Object, Boolean ByRef)'.
at MySql.Data.MySqlClient.MySqlConnection.set_ConnectionString(String value)
at MySql.Data.MySqlClient.MySqlConnection..ctor(String connectionString) in :line 0
What version of the framework are you using? There is a targetplatform option you may need to set if you are using 4.0/4.5 for example.
/targetplatform:version,platformdirectory