Latest Google.Cloud.Translation.V2 no longer compatible with UWP app - google-translate

I have been using Google.Cloud.Translation.V2 in a UWP app for a while. Its latest NuGet package is 3.1.0. Upgrading from 2.x to 3.x results in the following error:
NU1202: Package Google.Cloud.Translation.V2 3.1.0 is not compatible
with uap10.0.19041 (UAP,Version=v10.0.19041) / win10-x64-aot. Package
Google.Cloud.Translation.V2 3.1.0 supports:
net462 (.NETFramework,Version=v4.6.2)
netstandard2.1 (.NETStandard,Version=v2.1)
Does this mean the newer versions will no longer work with UWP apps?

Does this mean the newer versions will no longer work with UWP apps?
TLDR; UWP is not a supported platform
From this GitHub issue:
We don't currently support UWP, and even if using grpc-dotnet makes it technical work, it's unlikely that we will prioritize UWP support over other work. So when we have moved over to grpc-dotnet by default, you may be in a situation where you can try to use the libraries and quite possibly be successful, but we would still not support it.
Also shown in this comment:
To reiterate: UWP is not a supported platform for these libraries. You could potentially use the Google.Apis.* NuGet packages, which don't use gRPC, but again, UWP isn't a supported platform for those either.
Final note (from this comment):
You may find that the REST-based libraries for whichever APIs you're using (packages starting "Google.Apis") work, but again those aren't actually supported on UWP.

Related

Flyway DB - Deprecated Version

is there a way to know when a version of Flyway is going to get deprecated?, actually we were using 6.0.7 the last year and then got deprecated like 6 months ago, now we are using 6.4.1 but I tried to find something on the blog and documentation but there's nothing about some news of when a version is going to be deprecated, only when we run our java spring boot project we know that a version is not usable. And we're aware of this because there's a lot of changes in version 7+ that doesn't work with our project (tested version 7.0.1 and the app crashed) and we need to estimate the cost of the changes.
Any help would be appreciate, thanks.
Flyway releases via Maven OSS. Old versions are kept indefinitely and are outside of Redgate's control. In theory, all older versions which are currently available on Maven will continue to be available for all time.
Newer versions may deprecate features over time, but older versions will always be available.

How to resolve dependencies and target framework for Xamarin.Firebase.Messaging nuget package which couldn't be installed

I want to implement Push Notifications in Xamarin.Forms.
It appears I need to use the NuGet package Xamarin.Firebase.Messaging - as referenced, for example, in this tutorial:
https://www.youtube.com/watch?v=le2lDY22xwM&t=1s
However, if I try and add this package to a vanilla Xamarin.Forms app, I get this error:
Package Xamarin.Firebase.Messaging 71.1740.0 is not compatible with netstandard2.0
I found this about this error, it's 2 years old but isn't really helpful:
https://forums.xamarin.com/discussion/86307/xamarin-firebase-not-compatible-with-forms
I also can't comment on that post as the login appears to be broken.
How can I fix this error? (as an aside if anyone has a better suggestion for sending cross platform notifications in Xamarin.Forms I welcome it, I've tried AppCenter.ms but couldn't get that working either).
Thanks.
I would recommend you to follow this tutorial here.
You don't need to to install specifically version 71.1740.0. You can just install version 60.1142.1 and it works too.
This issue is mainly caused because of dependencies to Xamarin.Android.Support nuget packages and the Target Framework in your Android project.
On this page you can find all dependencies related to Xamarin.Firebase.Messaging nuget package. If you go through dependencies of version 71.1740.0 you find that you need to set Target Framework to Android 9 in your project. See picture bellow.
To install latest Xamarin.Firebase.Messaging into Xamrin.Forms vanilla project you just need to change this Target Framework to Android 9.
However, if I try and add this package to a vanilla Xamarin.Forms app, I get this error: Package Xamarin.Firebase.Messaging 71.1740.0 is not compatible with netstandard2.0
According to your description, you only install this package into a Xamarin.Android project as there are no targets for this NuGet package to install into a PCL.
Look at the "Dependencies" on NuGet,In this case, only MonoAndroid90 is supported. This is synonymous with Xamarin.Android targeting API 28 minimum. So please check Compile using Android version:(Target Framework) and Target Android version is Android 9.0.

How do I verify if I'm using the native iOS SQLite provider, and how do I correct it?

I'm using a new project that's using sql-lite-pcl and it doesn't appear to be loading the required dependency packages (recursively). I know this because "it just doesn't work (tm)"
I've been able to get the project to work by adding the following on the Xamarin Forms project and the iOS project
SQLite-net-pcl
SQLitePCLRaw.bundle_green
SQLitePCLRaw.core
SQLitePCLRaw.lib.e_sqlite3.ios
SQLitePCLRaw.provider.dynamic_cdecl
SQLitePCLRaw.provider.internal.ios_unified. (iOS only)
SQLitePCLRaw.provider.ios_inified (iOS only)
For most of the items above I needed to install a 1x version, whereas the 2.0 version of SQLite reported a variety of errors from the SQLite-net-pcl library. (there is an open GIT issue on the project page for 2.0 support)
Question
How do I verify (in runtime?) that I'm using the native iOS provider?
Does it matter if I switch between the iOS provider and the code- based one? In either data binary reading and writing, locks, app suspension/closing handles, performance or any other reason?
What are the correct libraries to load if simply adding sql-lite-pcl into a Visual Studio for Mac doesn't recursively load all dependencies, and the correct version of them?
There is a very good tutorial how to use SQLite for Xamarin Forms. You can find it here.
It's working fine both for Android and iOS version

Xamarin.Forms cannot update Xamarin.Forms Package from version 2.3.4.270 to 2.4.0.282

I'm trying to update a project to the newest version of Xamarin Forms and I'm getting an error. The error is the following
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 25.4.0.2' is not compatible with 'Xamarin.Forms 2.4.0.282 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
Although the error message is obvious, it's strange that the new Xamarin.Forms package needs an older version of Xamarin.Android.Support.Design.
So, I created a new project and I saw that the versions in the new project are:
Xamarin.Forms 2.4.0.282 and Xamarin.Android.Support.Design 25.4.0.2 (!)
That's odd. The new project contains the version 25.4.0.2 Xamarin.Android.Support.Design. The old project rejects the update because it contains that version of Xamarin.Android.Support.Design. Doesn't make much sense.
So, the question is Why, am I getting this error and why I cannot update to the new version of Xamarin.Forms?
Try update your android support libraries first and then update to the latest xamarin forms 2.4.0
You're getting the error because Xamarin does not use latest versions of those android support libraries. You can see that when you install Xamarin.Forms package (Nuget-Manager: update only Xamarin.Forms), if it depends on newer versions of android support packages it will automatically update them.
So basically as long as Xamarin.Forms does not use latest android packages, they will always show 'update available' but when you update them, they're not compatible with Xamarin.Forms anymore.
Edit:
Sometimes it seems deleting packages and bin/obj folders is not enough.
If found this link with instructions for deleting nuget cache.
Fixing Xamarin.Android build errors

Xamarin with Entity Framework Core: Error: unauthorized access to "/system/lib/libsqlite.so" on Android 7

Im trying to create a Xamarin Forms App using the new Entity Framework Core. The app targets android 6.0 but my Emulator is running Android 7.0. I installed the following related Nuget packages on the android project:
Microsoft.EntityFrameworkCore --> 1.1.1
Microsoft.EntityFrameworkCore.Sqlite --> 1.1.1
When accessing my DbContext on Android a message will pop up telling: Detected problems with native libraries unauthorized access to "/system/lib/libsqlite.so".
This Xamarin forums thread suggests, that it's due to the native SqLite binaries are no longer supported (on Android 7?) and the common fix seems to be to switch to the SqLite.Net PCL.
However as Microsoft.EntityFrameworkCore.Sqlite depends on Microsoft.Data.Sqlite which in turn depends on the native SqLite package I cannot just replace this (or can I?)
Strangely enough, despite of the error message suggesting otherwise, the data access seems to work. At least migrations run and repeated writes to the database will create new Ids.
Of course I could just scrap EF Core but I guess a lot of people are looking into using it for Xamarin in the future. So it would be nice if anyone would find/know a fix.
I had the same problem. I have fixed this using the following libs: sqlite-net-pcl (version 1.2.0), SQLitePCLRaw.bundle_green, SQLitePCLRaw.core, SQLitePCLRaw.lib.e_sqlite3.android, SQLitePCLRaw.provider.e_sqlite3.android.
Matheus Souza had the right idea there. However installing SQLitePCL is only part of the answer. Here is how I eventually solved this:
DISCLAIMER: This is a kind of "You can do it but it isn't pretty"-solution. If you have the time, it's probably best to wait for the official Microsoft.EntityFrameworkCore.Sqlite 1.2.0 release.
This issue brought me on the right track. The new (unreleased) version of EntityFrameworkCore no longer uses the native sqlite binaries, but sqlite-net-pcl. This is the steps I followed to install it:
Add the aspnetcore-dev branch to your nuget feeds. Nuget 3: https://dotnet.myget.org/F/aspnetcore-dev/api/v3/index.json
Check "Show preview versions" in Nuget and update (or reinstall) all EntityFrameworkCore packages to "1.2.0 - preview"
(Make sure your x64 is checked in your android projects advanced build options, if the app instantly crashes on deploy. This might be unreleated)

Resources