Understanding MVVM Cross Nuget Packages - c#

am trying to use MVVM Cross with Xamarin and found it very interesting.
Following Adding packages i tried adding the listed "MvvmCross.Droid.FullFragging" Nuget to PCL where am getting Errors.
Error: but the package does not contain any assembly references or content files that are compatible with that framework(Profile 111). For more
information, contact the package author.
Please help understanding the dilemma in installing MVVM Cross packages across Projects(PCL,Droid and IOS) and about PCL Profiling WRT MVVMCross,as existing documentation is not clear.

You can't add an Android package to a PCL library. PCL is just compatible with other PCL libraries.
Also i would suggest using the MvvmCross support packages instead of FullFragging as they are more maintained by Google.

Related

SignaturePad package for MAUI

There's a Xamarin package to implement signing feature in a Xamarin application. For now this repository is archived and there's no .net6.0 implementation for MAUI.
I tried to find a substitute for this package but did not succeed. Unfortunately commercial packages are not an option for my case.
Maybe I am missing something and MAUI has a such package?
There is a package in maui called Maui.CommunityToolkit. You can use the DrawingView as a replacement.
You can refer to this article.
In addition, I found a discussion about SignaturePad package for MAUI on git.
Here is the website: https://github.com/CommunityToolkit/Maui/discussions/270?sort=new

(Nuget PackageReference) Xamarin app builds even when I don't add a reference to Xamarin.Forms

I have a solution with a bunch of Xamarin.Forms cross-platform apps. I'm in the middle of a refactoring where I'm migrating things to Nuget PackageReferences. While doing so I encountered a few problems with portable app projects that referenced Xamarin.Forms, so I decided to uninstall the package from these apps and re-install it, then everything worked perfectly. While doing so, however, I realized that if I didn't reinstall Xamarin.Forms on the portable app package, things would still compile and work.
Can someone please explain to me how it's possible that a C# project that contains Xamarin.Forms code in it doesn't need to have a reference to the Xamarin.Forms package to compile? And does this have to do with Nuget PackageReferences?
Syncfusion.Xamarin.SfChart has a Xamarin.Forms dependency and thus it is auto-added to your project.
Dependencies
Syncfusion.Xamarin.Core (>= 18.2.0.54)
Xamarin.Forms (>= 3.6.0.344457)
re: https://www.nuget.org/packages/Syncfusion.Xamarin.SfChart
as it is well explained before another package has a reference to Xamarin.Forms, but... that's my addition to the response. I see in your code that you have a using Xamarin.Forms; statement, you are adding it as an indirect reference and then you are adding it to that part of code in a using statement that is not erroring. If that should not be added, then it will show with an underlying red mark, then in an error.
For more information about references, please go to https://learn.microsoft.com/en-us/visualstudio/ide/managing-references-in-a-project?view=vs-2019

Xamarin.Forms error install package

Package installer I get this error, gave this error in other packages
Error Could not install package 'Xamarin.GooglePlayServices.Ads
60.1142.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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.
You need to install this package into your Android project, not your Portable Class Library. It is a Android-only library that cannot work cross-platform. As you can see on the project's GitHub page:
Xamarin creates and maintains Xamarin.Android bindings for the Google Play Services Client Library
The library is not a C# library, but it rather contains bindings to native Java-based libraries and hence compatible only with Android.

Error loading packages in cross platform c# application

I offloaded a project which involved making a cross platform app from a website. My friend who was supposed to do the project, has given me a solution that contains a portable section and a droid section. The ios and windows apps will be made once i complete the remaining portions of the portable code.
Now, he used some packages that are failing to load completely on my system. He had compiled an apk from this code, so this code must be working, but I cannot resolve the issues with the packages. I removed the packages directory from the project he supplied to me, and rebuilt the project hoping the packages would restore themselves correctly. But I ended up with the same errors again.
Then I found that "Mono.Android" and "RestSharp" were marked with warning signs under the references list. So I removed these two, and tried installing them fresh from Nuget Package Manager. Trying to install RestSharp gave me the following error:
Could not install package 'RestSharp 104.5.0'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile259', 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.
And I also cannot find "Mono.Android" package in the Nuget Package Manager. My friend was unable to help me out on this. Please suggest how to get this project working.
Thanks in advance.
Debopam Parua

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

Categories