Hey guys I am trying to make an .NETCore app that draw some text on image and that is gonna be able to run on linux os.
I tried CoreCompat Drawing library, ImageSharp, ImageMagick and I couldnt get even one of them work on linux.
I develop the apps on Windows, everything works perfectly so I go and publish it for linux, I do a dotnet publish -r linux-arm, copy the publish folder onto my linux "server" and run it*(Same setup works for most of the .Netcore apps I did so far)*, but it throws almost the same exception for all of the libraries I tried, for example:
Unhandled Exception: System.TypeInitializationException: The type
initializer for 'NativeMagickSettings' threw an exception. --->
System.DllNotFoundException: Unable to load DLL
'Magick.NET-Q8-x64.Native.dll': The specified module could not be
found.
That's with ImageMagick.Net for example. just replace the dll name and you got error for other libraries aswell.
And I am clueless I google some tips but noone of them worked. My question is if anyone has experience with this exception or if you know about some working image drawing library, please tell me its name :D
If I stay with imageMagick, I was working with this https://github.com/dlemstra/Magick.NET/blob/master/Documentation/CrossPlatform.md
Package reference is correct, but it can't find any Magick.NET-Q8-x64.Native.dll.so
ldd Magick.NET-Q8-x64.Native.dll.so
Also tried to:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/ImageMagick/libraries
But without any results. So please if you have any clue what can I do or if you know about image library I can use on linux please say so, thanks :)
Related
I wanted to run an example using C# and MPI.NET (https://github.com/mpidotnet/MPI.NET).
I found some sources on StackOverflow that I should install open-mpi via homebrew. I did this.
I also have Mono installed, and after building the project with msbuild, I try to run Hello.exe with the following command:
mpiexec -np 2 mono Hello.exe
I get the exception System.DllNotFoundException: msmpi.dll assembly, which is straightforward. The problem is I don't know where to find this DLL, or whether some other mistake might be causing it.
I'm trying to write a timer-triggered Azure Function that downloads a bunch of data and processes it into a SQLite database. I've written code that does this and runs fine on my own machine. But, the same code in Azure yields a DllNotFoundException, complaining that the system can't load "e_sqlite3."
Here is the full error message (for the inner exception):
Exception while executing function: FnordFunction
Microsoft.Azure.WebJobs.Host.FunctionInvocationException : Exception
while executing function: FnordFunction --->
System.TypeInitializationException : The type initializer for
'SQLite.SQLiteConnection' threw an exception. --->
System.DllNotFoundException : Unable to load DLL 'e_sqlite3': The
specified module could not be found. (Exception from HRESULT:
0x8007007E)
at
SQLitePCL.SQLite3Provider_e_sqlite3.NativeMethods.sqlite3_libversion_number()
at
SQLitePCL.SQLite3Provider_e_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number()
at SQLitePCL.raw.SetProvider(ISQLite3Provider imp)
at SQLitePCL.Batteries_V2.Init()
at SQLite.SQLiteConnection..cctor()
End of inner exception
Here are the steps to reproduce:
In Visual Studio 2017, I created an Azure Function project using the latest template.
I added my code files to the project, and edited the "Run" method to call the code.
Using NuGet, I added sqlite-net-pcl, and some other libraries I need. (I've also tried this with EntityFrameworkCore, using SQLite; that didn't work either).
Build
Publish
Run. Failure.
The problem might be that my code is wrong--but it works fine when I just make a console .exe.
The problem might be that VS2017 is not bundling the correct dll for SQLite when it builds. I'm not sure how to fix that. I've seen from other searches that the same error message pops up when the platform target is set to "Any CPU," but changing that to x86 or x64 does not fix the problem.
The problem might be that the SQLite libraries I have tried won't run in the Azure Functions sandbox. If so, are there any simple SQLite libraries that will run in the sandbox?
Thanks in advance...
The problem is that when running in a Function App, native binaries can't be automatically loaded from your bin folder, so it's not finding the DLL.
One way to solve this is to drop it in your D:\home\site\tools folder (e.g. using Kudu Console), as that folder is automatically place on the PATH.
I am working on a Xamarin based mobile app. It has previously deployed to an iPhone, and is currently working on the simulator. However, when I try to Debug on my iPhone, I get:
Error MT2002: Failed to resolve assembly: 'PCLStorage.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64' (MT2002) (My_App.iOS)
PCLStorage is installed and up to date in my iOS and Core projects, although neither have any references to the package. It was installed when I added the AWS Core SDK. How do I resolve this error, I assume that is what is stopping the debug on iPhone?
Edit: (based on Answer below)
If I disable the linker in my build settings, I get the error:
My_App/iOS/MTOUCH: Error MT3001: Could not AOT the assembly 'My_App/iOS/obj/iPhone/Debug/build-iphone4.1-9.2.1/mtouch-cache/Build/AWSSDK.Core.dll' (MT3001) (My_App.iOS)
I would really appreciate some suggestions as I haven't made much headroom with this...
Try disabling "Linker" in the build options for Device builds. It's possible that if you are not directly referencing the library, the linker is stripping it out, causing it to fail at runtime.
I just had the same problem after switching from the simulator to an actual device
Fortunately, I've gotten the error only in 3 pages...
Fix was to remove the assembly attribute from the XAML:
From
xmlns:viewModels="clr-namespace:XXX.ViewModels;assembly=XXX"
To
xmlns:viewModels="clr-namespace:XXX.ViewModels"
I am just getting started with MonoGame (and game programming in general) and cant run any programs. I keep getting this exception message
An unhandled exception of type 'System.DllNotFoundException' occurred in MonoGame.Framework.dll
Additional information: Unable to load DLL 'openal32.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
Does anybody know how I can fix this?
You'll need to install OpenAL.
This is included in the standard MonoGame installer, and placed in "C:\Program Files (x86)\MonoGame\v3.0\oalinst.exe".
Yes, you need to install OpenAL. If you're bulding windows game project it will be wise to add OpenAL DLL file links into your project and mark them to be copied to Output directory. This way your deployed game will not require separate OpenAL installation on client (or even on another dev machine).
Dll files are:
OpenAL32.dll
wrap_oal.dll
I had the same error, when you have win10 it includes directX, so if you are using win 8 or less you need to install direct10: the link: https://www.microsoft.com/en-us/download/details.aspx?id=35&nowin10
and.... finally works!!!
I have developed a GTK# application that makes use of webkit-sharp to edit email templates. This application works in Linux but when it is run in Windows it does not work. I am using the webkit-sharp.dll from Linux in Windows. The error that I am getting is:
System.TypeInitializationException: The type initializer for 'WebKit.WebView' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'webkit-1.0': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
at WebKit.Download.webkit_download_get_type()
at GtkSharp.WebkitSharp.ObjectManager.Initialize()
at WebKit.WebView..cctor()
--- End of inner exception stack trace ---
at WebKit.WebView..ctor()
at MainWindow..ctor()
I am guessing that webkit-sharp.dll only wraps the native libraries for WebKit. I do not know where to get "webkit-1.0". Is there a webkit-sharp.dll that is specific to Windows for GTK#?
I did exactly that. I guess the webkit windows dll does not use gtk as rendering engine.
What I did was install the libwebkit dll provided by the suse mingw32 port and all of its dependencies.
You can see a full list of dependencies here
At the time of doing it(1 year ago more or less) the rendering was not perfect, but it may have improved.
I'm also having this problem...
Not tried this, but at http://www.webkit.org/building/checkout.html
The site suggests:
Download webkit support libraries
Run the update-webkit script
Build webkit from source
I think this requires cygwin installed.
I'm just paraphrasing the site - not tried this yet.
Have you tried running the Hello World example app to make sure everything is set up correctly in your Windows environment?
http://mono-project.com/Mono_Basics
You can also try some of the other example programs to make sure they function without error.
http://www.mono-project.com/GtkSharpBeginnersGuide
Seems like a common installation issue requires the addition of an environment variable in windows to get the assemblies loaded correctly:
http://www.mono-project.com/FAQ:_General#Installation_Problems