I have developed an windows desktop Application using C# .NET 4 framwork.Now, we are going to using MONO2.10 for cross platform.For sample, I have downloaded the mono 2.10 on windows version and able to run my .net exe.While doing so, Its Working fine and it says error the below mentioned error msg. As per my understanding, I think the DLL Reference is not included properly...
i am using 2 third party dll files in application.
Ionic.dll for .net zip library
DocumentFormat.OpenXml.dll for XML file management.
Please guide me to how to include these dll reference in Mono on windows?
Thanks & Regards,
Saravanan.P
This library is not part of Microsoft .NET or Mono Framework.
Therefore, you just need to either put it in GAC or in the same folder with your application, just like you normally do with third-party components.
Related
I have C# Console project that develop in visual studio on Windows with .net framework 4.6. In my project use MKL and IPP library. In Windows my project run correctly. I migrate to CentOS 7 and want run my project in this OS. I have several problem that resolved. Now my project build successful and run correct until now use MKL library. In first use of MKL get System.DllNotFoundException" mkl_rt.dll error. but all MKL dll (include of mkl_rt.dll) exist beside of .exe file.
You can download MKL for linux from https://software.intel.com/en-us/mkl/choose-download
after install this .so file exist. you can find libmkl_rt.so and copy it beside your .exe file or add this to ldconfig.
One note - Libmkl_rt.so enables you to select the interface and threading library for Intel MKL at run time. By default, libmkl_tr.so is linking with intel threading run time – libiomp5. Therefore in your cases, you need to add this shared object into your system paths as well. See more details follow mkl developer user guide “Using the Single Dynamic Libraries”
I have to convert a very very simple program from Vb to C#.
The Vb has those references
From seeing here if I am not mistaken those should be managed dlls. I achieve the same result if I follow the procedure here with the dumpbin.exe program.
So everything should be fine.
But when I do that CWorkpiece instance = new CWorkpiece(); I get the following error
which tells that the relevant dll is not in the right place.
However the file is right were it should be
That said I have thought that perhaps I had done a wrong investigation but adding the following lines didn't help
[DllImport("C:\\Temp\\1\\Okuma.CLDATAPI.dll")]
public static extern int CWorkpiece();
So in short the problem is all related with that dll which can't be found
Thank you in advance for any help
Patrick
Refer to Section "4.5.1.3.3.1 Missing library file" of the THINC API Installation Manual.
All applications developed with .NET THINC-API libraries are required to include an exact version of THINC-API libraries with the custom installation. THINC-API libraries compiled with application should
be installed with your application folder.
The above error message shows that THINC-API library named Okuma.CLDATAPI.dll cannot be found at the folder where the application runs from.
Solution: Include THINC-API libraries compiled in your application with your custom setup and re-install
your application with new setup.
Yes the THINC API libraries are managed .NET libraries. The command (CMD) API is written in VB, and the data API in VC++. Depending on the API version you have, these libraries either written in .NET 1.1 or 4.0.
So you really shouldn't be attempting to Pinvoke them.
The real problem you are facing is attempting to run your program in an environment which does not have the THINC API installed. Yes, you have the libraries referenced by your application, but that is not enough.
The THINC API libraries have several dependencies including:
Okuma.FlexNet.dll
Okuma.ApiLog.dll / Okuma.Api.LogService.dll
LDATAPI.dll / MDATAPI.dll / GDATAPI.dll
LCMDAPI.exe / MCMDAPI.exe / GCMDAPI.exe
PIODlib.dll
Softswitch.exe
Solution
Obtain a copy of the API Install disc; either from a disc that has shipped with an Okuma machine, or a new version through your Okuma dealer.
Install the development version of the THINC API in your development environment.
Note that you will not be able to Init() or call any other API functions unless your environment is one of the following:
An actual Okuma Machine with CAPI Option and THINC API Installed
An "NC-Master" Simulator such as this:
Or a PC NC-Master which is an all software simulator.
I'm creating a Monogame UWP Project and whenever I make a call to an included very basic compiled DLL .NET Core library within the project it throws the Error: Could not load file or assembly System.Runtime 4.1.0.0
Here is the project Sample:
http://www.filedropper.com/game1_2
Is everyone else getting the same Error? How do I go about fixing this issue?
Kind regards, Josh L.
As #iinspectable said in the comments:
You cannot reference a full .NET assembly from a UWP project.
UWP is a thing on it's own, and is basically incompatible with .NET as it needs to run on all Win10 platforms (where .NET is meant to be run on Windows PC). Now i don't know monogame, but if it's a .NET Library, it's incompatible with UWP.
I am using asp.net web application.
I have one product where it dll named as opensp.dll. This application used the latest version of this app and it is 6.0.
There some class library modules which are used the reference of opensp.dll and it is older and it is 4.0. When I individual built these class library with 4.0 it is successfully built ,but it not allowed with the 6.0. No worries for not to built in 6.0.
but my problem is these class library's built dlls path to asp.net application(opensp.dll)'s bin directory. so when I run this web application it gives me error of some method not found of opensp.dll. so I have replace new version of opensp.dll 6.0, then every this works fine. my application and modules of class libraries.
So each time when I built dll of class library I have put copy of opensp.dll to bin . I made back up of opensp.dll somewhere else. I don't have code of opensp.dll.
Can you please suggest to overcome this copy paste and work smooth process?
check your
[assembly: AssemblyVersion("X.0.0.0")]
in assemblyinfo.cs of class library . Is it still 4.0.0.0 ? Also your question is a bit unclear so let me ask , are you planning on keeping both dlls ? If yes have a look at side-by-side execution of assebmlies :- https://msdn.microsoft.com/en-us/library/8477k21c(v=vs.110).aspx
You can strongly name both the assemblies and deploy in GAC , but it not recommended to do so as the GAC is a shared resource and is available to all the applications running in the framework .
I have made an application using C# in windows forms. I am using Install shield 2010 to create a setup file for the application. It asks me what it should check for as prerequisites which it would check for before starting to install on any other device.
However, I do not know what I should include as prerequisites for my windows application. I do not know if it requires .net 4.5 or 4 or 3.5... I also had downloaded and included some references in the project and do not know if they are being included in the setup or not...
Please help
You need to look at the project properties of your winform app and see what version of the .NET framework you are building against. In some cases you can do things like compile against .NET 2.0 but then have an App.Config file that says 2.0 and 4.0 are supported runtimes. This gives you flexibility in choosing which if any .NET to redistribute.
From there you have to look at your dependencies (references) and there dependencies. It's possible that they require additional things such as C++ runtimes, database engines. For each of these you have to figure out if it's already part of windows, if a third party redistributable exists, can it be statically linked or privately deployed and so on.
There is no one simple answer. You just have to be familiar with your code base, what it requires and what the best practices are for each of those items.