Xamarin.Forms.Maps not showing under installed packages - xamarin

I am following tutorial https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/map/setup
I created a Xamarin.Forms project
I can browse and search for Xamarin.Forms.Maps I clicked Install
but I don't see it under installed packages
I see that it has a bunch of dependencies, but they dont seem to install automatically.
Do I need to install all of those one by one?
Is there a way to automatically install all necessary dependencies with correct version like in python?
Thanks,

Related

Install Nuget on Xamarin.Forms for every proyect or not

When you install a nuget in Xamarin.Forms is it necessary to do it on every project (project, project.Android and project.IOS)?
Which pros and cons has do it or how I know where I have to intall each of them?
There is no absolute answer, it will depend on the Nuget Package. So you will have to read the information about it before deciding to install it in your project.
What defines this?
Take for example Xamarin.Essentials, it is installed in all the projects because you can call the functions in share code, but the actual implementation is in the platform specific. In this case you even have to call Init in every platform
From Xamarin.Essentials doc
In the Solution Explorer panel, right click on the solution name and
select Manage NuGet Packages. Search for Xamarin.Essentials and
install the package into ALL projects including Android, iOS, UWP, and
.NET Standard libraries.
If you apply platform specific code, you might need some extra Nugets for that code, meaning that you would only add it to your Android or iOS or UWP code
If you have any doubt about where to install the package, you can always ask :) Also if you install an Android package in an iOS project, you surely will get a compiling error.

Xamarin - Updating nuget packages caused errors

I created a "Cross-Platform App (Xamarin.Forms)" app, and i immediately went and update the nuget packages (this is what i was told to do). Then i tried to built it, and not only I got several errors(see bellow) that were about the updated packages, I had code errors as well. I swear the God that i didn't touch the code of the project at all, and here is what I get:
I googled, but i couldn't find out a clean solution for this. I am just one step before quitting this (unprofessional) product, because i cannot run the ready template. Is there someone that can give me a piece of advice for these ridiculous errors ?
Could not install package 'Xamarin.XXXXXXX'. You are trying to install this package into a project that targets 'MonoAndroid,Version=vX.X'
You need to increase your "Compile Target Framework" to at least 7.0 as this error indicates.
You can review the dependancies of a package on the Nuget.org site by looking at the Dependencies section of a particular package:
https://www.nuget.org/packages/Xamarin.Android.Support.v7.AppCompat/
Another SO question/answer example that requires at least MonoDroid 8.0:
https://stackoverflow.com/a/49138485/4984832
Example:
Xamarin.Android.Support.v4 27.0.x.x requires at least MonoAndroid 8.1 to be set as the Compile Target Framework:
You have to use newer android SDK version. You can download the SDK from android SDK manager and then select it from project properties

Cannot install NuGet packages to PCL - "package does not contain any assembly references or content files that are compatible with that framework"

I am trying to follow a tutorial on consuming web services in Xamarin Forms. I created a fresh project and have tried to install Refit, that didn't work so I tried to install RestSharp. I can install both of these libraries to my Droid / iOS projects, but not to the PCL. I get the following error in Visual Studio:
Could not install package 'Refit 4.0.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', 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
Could not install package 'RestSharp 106.2.1'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile111', 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've found this post on the xamarin forums, but it didn't fix my issue. My project is fresh, everything is up to date... Does anyone know how I can fix this issue?
vents XF is supposed to make developing cross platform apps faster & easier, but i think I'd have done this poc in native ios/droid twice in the time it's taken me to install a library to a blank project! :)
This happens because RestSharp it's not compatible with PCL-library. So you will have to handle whatever you're trying to do in platform specific.

Cocossharp support for Xamarin.Mac

I am looking to develop a game using cocossharp targeting Mac. When I am trying to add NuGet packages, CocosSharp packages are failing to add with the following error:
Could not install package 'CocosSharp 1.7.1'. You are trying to
install this package into a project that targets
'Xamarin.Mac,Version=v2.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.
Could someone explain which is the right package or if there was a versioning problem that I am hitting into here.
I also noticed the - http://mono.github.io/CocosSharp/ where I see an issue "#371 CCGameView: Add Mac support" marked to be part of the next release. Does that mean, Cocossharp is currently not supported on Mac?

How can to install multiple versions of javascript library using nuget?

I want to install multiple versions of bootstrap on my project but when I do so using package manager console, nuget is just updating it.
Is it possible to install multiple versions of javascript library at all using nuget?
Not into the same project. A project will have only one version of a NuGet package.

Resources