Having a little issue with Flurl (are you missing a cast?) - flurl

Hello Stackoverflow Users,
I just want to use an API of someone, but he did'nt put a release on github so you have to compile the api for yourself.
The API im trying to use, is using Flurl, i imported everything but now i have some errors and i can't compile the api.
(Note: im asking here for help because im not that advanced enough to know how i can fix this)
The error is saying:
Cannot implicitly convert type 'Flurl.Http.IFlurlClient' to 'Flurl.Http.FlurlClient' An explicit conversion exists (are you missing a cast?)
A Screenshot of the Error in Visual Studio
(The API Iam trying to use is https://github.com/Tustin/psn-csharp)

The IFlurlClient interface was introduced in Flurl.Http 1.1, but the source code you're working with uses 1.0.1. If you downgrade to Flurl.Http 1.0.1 you should be fine. It might be easiest to just start over, i.e. re-download the API source and don't upgrade the NuGet packages.

Related

Dotnet Core 3.1, EF1001: internal ef core api usage

Upgraded to Dotnet Core 3.1 from 2.2, EF core kept complaining EF1001: internal ef core api usage by putting an Exclamation Mark in my project.
But no error / warning shown during compilation. I do not know which line of code is causing the trouble.
May I know how can I find out which API / Method that I am not suppose to use?
The warnings from these analyzers can be really confusing. If I understand this correctly, the issue is not what it seems.
The message with the gray warning icon inside the analyzer is normal and indicates what the analyzer is checking. See the Analyzers in Solution Explorer documentation for an explanation.
If you are experiencing yellow icons on the parent node ("Analyzers") try to unload/reload the project, or maybe open Visual Studio in admin mode. See the answer to "Analyzers warnings in ASP.NET Core 2.2 project in VS2019
" for details.
If you don't see a warning in the error list then I advise you to ignore that.
The GitHub issue "Confusing analyzer warnings in solution explorer with no way to see any details" provides additional information on this.
Are you using a database provider (i.e. packages for SQLServer, Postgres, etc)?
It sounds like you are saying there is some warning being given with your dependencies. I know Microsoft announced some breaking changes, mainly for database providers, with EF Core with the 3.0+ updates. Could be as simple as updating the other packages in your project.
Just guessing, I could very well be wrong.
figure it out for me, was getting the same warning,
it was using an entity framework namespace
(using Microsoft.EntityFrameworkCore.Internal;) and not
using System.Linq; which was extremely odd as I didn't add the Ef one at all.
which is why I was so confused and started googling and how i got to this page.

Error Message: Unable to resolve interface type > 'Android.Gms.Common.Apis.GoogleApiClient/IConnectionCallbacks'

I am a new Xamarin programmer. I was building an application via the simulator in Visual Studio 2017 for Mac and one day I saw the android version would not build. Since I was doing development primarily for iOS I procrastinated and pushed it for later. I now have an Android device to test on but I am getting this message:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(3,3):
Error XA4204: Unable to resolve interface type
'Android.Gms.Common.Apis.GoogleApiClient/IConnectionCallbacks'. Are
you missing an assembly reference? (XA4204) (prayupapp.Droid)
I saw that the Google Play Store location services nuget used that so I even installed that Nuget and it still can't find that one reference. As a non android person I have no clue how to begin debugging this. Its crashing in Java here:
ResolvedAssemblies="#(_ResolvedAssemblies)"
Can someone point me in the right direction as to how to solve it?
I fixed this issue. You should be getting this issue because you have multiple versions of the GooglePlayServices in your Android project.
In my case, I had a Nuget package called SimpleLocation which was using an old version of GooglePlayServices (29.0.0.2). I updated this package (SimpleLocation) to its latest version which was using GooglePlayServices 60.1142.1 and the solution is building successfully now.
Have a look at the error message provided by Visual Studio and find the name of the Nuget package which is using an old version of the GooglePlayServices... in my case was SimpleLocation... Remove this Nuget package and comment out the code using this package and try to build your solution again.
I hope it helps.

Unable to execute R code on U-SQL using R extensions

I have been trying to execute R code on U-SQL using the R extensions mentioned in the documentation (https://learn.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-r-extensions).
When I try to execute the example scripts mentioned in the link above, it throws the error:
C# error CS1739: The best overload for 'Reducer' does not have a parameter named 'rReturnType'
And when I remove the rReturnType parameter I am unable to make sense of the output.
Are there any other Extension.R parameters which will serve the same purpose?
Which version of the extensions have you installed? if you installed them some while ago, the parameters of the libraries may have changed and be out of date with the documentation. I am pinging the owner of the documentation page to make sure that the docs are in sync with the latest released version.
UPDATE: I checked and the documentation is aligned with the latest version. Please go to the ADLA Portal and reinstall the U-SQL Extensions. Please make sure that you read up on the release notes in case you or someone else uses the older version.

Xamarin SQLite "This is the 'bait'"

I follow this guide trying to create a SQLite database to my proyect. But always got same error, doing the exactly steps of the article.
System.Exception: This is the 'bait'. You probably need to add one of the SQLitePCLRaw.bundle_* nuget packages to your platform project.
Have you added the SQLite package to all your projects? You need to add it to the app projects as well as the PCLs.
This is what the error is telling you. It uses a trick called 'bait and switch' whereby it installs a dummy assembly in the PCL with a particular interface, and in the Android and iOS apps it installs a platform specific assembly with an identical interface that actually does the interactions with the database. The idea is you code against the PCL, but at run time the platform specific version of the library is used. You can read more about this pattern at https://web.archive.org/web/20161209075521/http://log.paulbetts.org/the-bait-and-switch-pcl-trick/
Essentially though, this error is telling you that you haven't installed the NuGet package in your platform-specific projects.
I was experiencing this issue despite following the instructions in the error message and installing the missing library.
A clean & rebuild solved it
I had installed the packages (SQLite-net PCL) but I uninstalled them, then reinstalled. And then I cleaned the solution and rebuilded it and now it works.

Resource.Designer.cs file not updating correctly

I'm trying to build a simple barcode scanner using Xamarin forms and I'm using ZXing Library (I copied/added the Dlls manually).
when i build the project i get the following errors:
'Resource.Id' does not contain a definition for'contentFrame'
'Resource.Layout' does not contain a definition for 'zxingscanneractivitylayout'
'Resource.Layout' does not contain a definition for 'zxingscannerfragmentlayout'
I did my research before posting this, I know that the error has something to do with the "Resource.Designer.cs" file not being updated but I honestly don't know how to fix this.
I also found this old post with the same problem
[Unknown globals when installing ZXing Scanner
but nothing suggested worked for me.
Any Idea, how can this error be fixed, Thanks for your help.
Edit : I'm using Visual Studio Enterprise 2015 and Xamarin Forms v2.2.0.45
Just update to Zxing.Net.Mobile 2.1.0.1 beta prelease and the errors will disappear.
The problem is widely known
Xamarin bugzilla
Issue on Github repository of Zxing

Resources