Cocossharp support for Xamarin.Mac - macos

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?

Related

xamarin forms socketioclientdotnet

I'm not sure if this is a Visual Studio issue or a genuine incompatibility but trying to install SocketIoClientDotNet into a Xamarin forms PCL project I get
Could not install package 'SocketIoClientDotNet 1.0.6'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.5,Profile=Profile7', 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.
The project targets .NetFramework 4.5 which seems to be supported by the package - what could be going wrong here?
I suggest you add the following packages in your .Droid and .iOS projects (and not in the "common" project):
EngineIoClientDotNet (v.0.9.22)
SocketIoClientDotNet (v.0.9.13)
WebSocket4Net (v.0.14.1)
These versions of packages were the stablest 6 months ago when I had to use sockets in my project. If you want more information don't hesitate to ask me!

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.

Cannot install Simple OData Client in Xamarin.Forms

This suggested Nuget Client will not install on Visual Studio 2017 for Mac. When I attempt to install, I receive the following error message:
"Could not install package 'Microsoft.OData.Edm 6.0.0'. 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."
The link to this Nuget package is https://components.xamarin.com/view/simple.odata.client.
When trying to install other Nuget packages I receive a similar error message naming a different package as the error source.
It looks like you're mixing a couple of things. The Simple.OData.Client package is not the Microsoft.OData.Edm package. Also you say you link to a NuGet package, put you link to the Xamarin Component Store.
Furthermore, I think you should read up on what PCLs are and how to use them. When I look at the NuGet page for the Microsoft.OData.Edm package I see that it does not support iOS and Android. So, you will never be able to install it to a PCL which targets one of these platforms. You should, however, be able to install the Simple.OData.Client package according to the NuGet page.
PCLs have a certain profile. When you right-click and go to the properties of a PCL library, you can check all platforms that you want it to support. Each combination of platforms have a certain profile, specified by a three digit number, like 111 or 259. The parts of the .NET framework that are available to you, are an intersection of the functionalities that are available on all targeted platforms. If a functionality is supported by iOS but not on Android, it's not supported in your PCL.
This is also why NuGets need to support the specific profile that you are targeting, because it can only use the methods that are available in it.

How to install 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3' on Xamarin PCL?

Following this tutorial I'm trying to install MvvmCross.HotTuna.MvvmCrossLibraries in Core project. The latest version of this library 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'.
After adding Nuget Package I have the following error:
Could not install package 'MvvmCross.HotTuna.MvvmCrossLibraries 4.0.0-beta3'. You are trying to install this package into a project that targets '.NETPortable,Version=v4.0,Profile=Profile14', 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.
Does anyone know what the problem is?
Answer to original question:
MvvmCross is not available for ASP.NET. You need to use it in one of the compatible frameworks like UWP, Xamarin.Android, Xamarin.iOS or a PCL.
Updated Question:
MvvmCross uses at least .NET 4.5 with profile 259. Switch to those to be able to install the libraries.

Resources