Xamarin.Android Error: unauthorized access to “/system/lib/libsqlite.so” - c#

I have researched this for hours and can't figure out how to fix this issue. Every time I launch my app i get the error stated in the title. I currently have sql-net by Frank Krueger nuget package installed. I reference 'using SQLite;' in my code which looks at SQLite.cs and SQLiteAsync.cs. I was reading that installing the nuget package sql-net-pcl by Frank Krueger can resolve this issue? If so, how would I use this since I can't reference the two SQLite classes anymore if I do install it.

I currently have sql-net by Frank Krueger nuget package installed.
You're using the old SQlite version which is not compatible with Android 7.0 and higher version, if you installed the some SQLite relative library, please refer to this doc: Preparing for Native Library Linking Changes in Android N, and try to update your library as the doc suggested.
For sql-net package, you can try to install the sqlite-net-pcl package.

Related

How do I install System.Drawing.Common in a project that uses '.NETFramework,Version=v4.5.2'?

I am trying to write some unit tests in C# in a '.NETFramework,Version=v4.5.2' application but all tests give the next error:
'System.IO.FileNotFoundException : Could not load file or assembly
'System.Drawing.Common, Version=0.0.0.0, Culture=neutral,
PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file
specified.'
When I try to install System.Drawing.Common I get the next error from the NuGet package:
Could not install package 'System.Drawing.Common 4.5.1'. You are trying to install this package into a project that targets
'.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more
information, contact the package author.
I cannot change the application version or the framework (.NET Core 2.1) and any other trick I found online did not work (or generated more errors).
Help?
in NuGet put this line :
Install-Package System.Drawing.Common -Version 4.5.2
in .NET CLI put :
dotnet add package System.Drawing.Common --version 4.5.2
in Paket CLI put :
paket add System.Drawing.Common --version 4.5.2
Had the same problem. I have cloned solution https://github.com/barnhill/barcodelib . It has two projects: library project targets .Net Standard 2.0 and refers to System.Drawings.Common. Example project depends on library and has reference to System.Drawings.Common. Example project was not compiling due to same error.
My solution was just to remove reference to System.Drawings.Common in nuget packages and readd it (rclick on Example project > Manage nuget packages > Browse Installed, remove the System.Drawings.Common package, and then add it back), unload project and then reload it again
Helped for me.
I managed to solve it by restarting Visual Studio, changing the framework to 4.6.1 (which I could not do before) and adding the reference.
OP's solution migrated from the question to an answer.
you could try to use one of the libs described in here instead https://devblogs.microsoft.com/dotnet/net-core-image-processing/
you could try to use https://www.nuget.org/packages/CoreCompat.System.Drawing/ as well and maybe try to change your app framework to .net standard 2.0?
This is kind of bizarre but it worked dramatically so I'm going to mention it. I built a small vs 2017 ent console project that was supposed to read an oracle database. When I started to run it I got the System.Drawing.Common error mentioned above. It seemed stupid because I wasn't really doing anything having to do with Drawing at all. In Manage Nuget Packages I deleted the Oracle.ManagedDataAccess driver and added the Oracle.ManagedDataAccess.Core and the System.Drawing.Common error went away and I was able to read my oracle database. So I'm suggesting that with NuGet you may be picking up some things you really don't need and if you have any choice for your NuGet packages, try different ones. This also may be some foible with how my organization managed nuget for Visual Studio 2017 enterprise.

How to install Microsoft.Azure.Devices NuGet package for Unity?

I was working with Unity and Hololens and tried to establish connection to Azure Iot Hub via MQTT protocol. Microsoft provides a tutorial for getting started with Azure IoT Hub in C#, but unfortunately, I encountered a problem with the tutorial:
In the picture above, I have selected Microsoft.Azure.Device NuGet package for installation. I have tried version 1.0.0 and also the latest one available, 1.2.4. The projects were automatically generated by Unity and that is probably the reason, why I do encounter this problem. Which problem? After I try to install the selected NuGet, I encounter the following error:
Could not install package 'Microsoft.Azure.Devices 1.2.4'. You are
trying to install this package into a project that targets
'.NETFramework,Version=v3.5,Profile=Unity Full v3.5', but the package
does not contain any assembly references or content files that are
compatible with that framework. For more information, contact the
package author.
I was like, "Hmm, I must have wrong .NET framework version. I wonder if I can change that..." I tried to go to project properties like this
Microsoft advises changing .NET framework from Properties context menu item:
https://technet.microsoft.com/fi-fi/library/bb772098(v=vs.90).aspx (4.24.2017)
https://msdn.microsoft.com/en-us/library/bb398202(v=vs.100).aspx (4.24.2017)
However, this feature must be blocked by something, because the view that is supposed to open flashes white and disappears immediately. I suppose Unity doesn't like people tinkering with project properties, but what else can I do? Incompatible .NET framework issue needs to be resolved, so that the NuGet package can be installed, but how do I do that?
In short, how to install Microsoft.Azure.Devices NuGet package for Unity?
Sorry, this isn't possible due Unity's restriction to .net 3.5.
To be exactly, they use a custom version of mono-2.
You could try the new (experimental) .net 4.6 settings in Unity 5.6.
https://forum.unity3d.com/threads/upgraded-mono-net-in-editor-on-5-5-0b4.433541/

Xamarin.Forms can't install Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1

Good morning all,
I am following the instructions on the azure site for adding offline sync capability in a Xamarin.Forms application.
I have added the package to the PCL without issue but when trying to add to the iOS client project I am getting the following error:
Could not install package 'Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
My project is well established in terms of completed code base so I downloaded the getting started app to test from scratch and the same issue remains.
Please help
Jordan Mazurke
Looks lite something is wrong with package 2.1.1.
Install version 2.1.0 instead and it should work!
See also Unable to install Microsoft.Azure.Mobile.Client.SQLiteStore 2.1.1 into Xamarin.iOS project with NuGet 2.12

Which nuget package holds the Microsoft.WindowsAzure.StorageClient.dll in Nuget

I just got a new computer at work and started to migrate my projects to VS2013. Now the problem is that with Azure SDK 2.4 the DLL Microsoft.WindowsAzure.StorageClient.dll is not included in it anymore.
I found this this post on the matter, were it was told that they were kept out of the 2.4 in order to keep it lighter and you need to add them in using NuGet.
OK, that's fair enough, but I've tried for hours to find the correct package with no luck. Anyone knows with package holds that DLL?
You're trying to add Microsoft.WindowsAzure.StorageClient.dll which is really-really old version of Storage Client library (thus not recommended). But if you're trying to get this DLL, try this link: http://www.nuget.org/packages/WindowsAzure.Storage/1.7.0.

Installing facebook c# sdk

I couldn't find any other questions on this...so I must be doing something wrong. I have never used NuGet before, so my problem could very well be there.
Anyways, I am making a WP8 app in VS2012. I went Project > Manage NuGet Packages > Online > Facebook. It is version 6.4.0. When I hit install, I get the following error:
Could not install package 'Facebook 6.4.0'. You are trying to install
this package into a project that targets 'WindowsPhone,Version=v8.0',
but the package does not contain any assembly references that are
compatible with that framework. For more information, contact the
package author.
Any idea how to resolve this?
I had the same problem, for me updating Nuget package installer worked. Initial version was 2.0 and it got upgraded to 2.5. Go to Tools=> Extensions and Updates => Updates => Visual Studio Gallery. There you can see update available for Nuget installer. After updating Nuget try installing facebook and facebook client packages.Hope this works....
The error you're seeing means that the package you tried to install for Nuget is incompatible with WP7/8 projects. Look at this Nokia article that explains how to use a modified version of the Facebook Graph API in a WP7/8 project.
I also faced this issue but, the previous version works fine.
go to tools => library package manager=>package manager console
and type
Install-Package Facebook -Version 5.3.2.0
and press enter.
Hope this will help :)

Categories