You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am wondering if I am misunderstanding what Mono can do?
I am not a C# or .NET person, so bear with me. What I need is to be able to load an external (third-party) .DLL which was built to be used with .NET project (.NET 4.6 in particular).
The DLL File is: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
What I did in the Windows was very simple: I have opened Visual Studio, added reference to the file and that's it, I was able to import it with 'Using Driver.dll;' right away and use it.
Now, I need to do the same on my Ubuntu 22.04 OS. From what I understand, I should be able to do this using Mono. I have installed Mono, successfully ran Hello World application, but now, I am lost at how am I supposed to use Mono to import my DLL file.
I want to remind, I do not need to do anything complicated, I just want to load that DLL and call 1 method, and that is it.
I have installed Mono, and the Mono 'Compatibility' page says that it supports .NET 4.6, but how does it work exactly. When I run csc HelloWorld.cs, how will it know what to use and where.
How do I exactly import the DLL? I saw Dllmaps page, but it was not helpful for me, as I understand, it maps given DLL files to already existing .so libraries, and I do not have that and I do not know anything about the internals of the .DLL, besides the few methods it contains. I also tried to -r:Driver.dll during build, but I assume that is not it, as I am not able to use it in code:
System.TypeInitializationException: The type initializer for '<Module>' threw an exception. ---> System.InvalidProgramException:
Please, could someone just point me to what should I do, if I want to just import one DLL and use its function in the same way I did very effortlessly in Visual Studio on Windows.
The text was updated successfully, but these errors were encountered:
I am wondering if I am misunderstanding what Mono can do?
I am not a C# or .NET person, so bear with me. What I need is to be able to load an external (third-party) .DLL which was built to be used with .NET project (.NET 4.6 in particular).
The DLL File is: PE32 executable (DLL) (console) Intel 80386 Mono/.Net assembly, for MS Windows
What I did in the Windows was very simple: I have opened Visual Studio, added reference to the file and that's it, I was able to import it with 'Using Driver.dll;' right away and use it.
Now, I need to do the same on my Ubuntu 22.04 OS. From what I understand, I should be able to do this using Mono. I have installed Mono, successfully ran Hello World application, but now, I am lost at how am I supposed to use Mono to import my DLL file.
I want to remind, I do not need to do anything complicated, I just want to load that DLL and call 1 method, and that is it.
Please, could someone just point me to what should I do, if I want to just import one DLL and use its function in the same way I did very effortlessly in Visual Studio on Windows.
The text was updated successfully, but these errors were encountered: