Reputation: 1854
I'm working on Android App in Xamarin with C# code.
I have a library dll created by me that I'm using has an reference in the AndroidApp.
But I have a problem with one file.
It includes this:
using Microsoft.SqlServer.Management.Smo;
using Microsoft.SqlServer.Management.Common;
This works fine in the original library, but using it has reference in my AndroidApp project makes app crash while is loaded, it opens but right after it crashes and without the file that includes this two references it works fine.
I know it because I've commented the code that uses this references and then works fine.
The output doesn't show any information about this error
Upvotes: 2
Views: 108
Reputation:
In most cases of 3rd party libraries, the C#(CIL) just invoke the native(C/C++) functions. Not implemented by itself even though the CoreFX.
It means that if the library has been implemented in target platform's (Android in your case) native code, you can invoke them in C# using DLL import or binding library otherwise impossible.
If you planned to make a shared assembly, you must check portability of the dependencies first. For example, the System.Drawing.Bitmap
is possible in .NET Framework
but Xamarin
. Therefore, you must not use it in shared assembly which for .NET Framework
and Xamarin
.
And this is really helpful for it. The .NET API browser. You can search any class of C# and get the portability information about .NET Core, Standard, Framework, Xamarin and so on.
Upvotes: 1