Looking at the MvvmCross.PortableSupport.3.0.1.nuspec I noticed the there is the following line:
<file src="_._" target="lib\portable-win+net45+MonoAndroid16+MonoTouch40+sl40+wp71\_._" />.
I understand that nuget is creating a list of supported frameworks from that list (win+...+sl40+wp71) and that the project to which this library is added must support one of those frameworks. Basically it enumerates the project types to which this can be added.
Now if I try to install this package into a portable project having Profile49 this will work on Windows since Profile49 on Windows is net45+wp80.
However on the Mac the Profile49 is net45+wp80+MonoAndroid10+MonoTouch10.
This means that a nuget package with the supported frameworks win+net45+MonoAndroid16+MonoTouch40+sl40+wp71 cannot be installed on a project of Profile49 on Mac since there are frameworks having a lower version (MonoTouch10 and MonoAndroid10).
Could the string portable-win+net45+MonoAndroid+MonoTouch+sl40+wp71 be used on the mvvmcross side instead? Any reason for the specific versions?
Why do the profiles shipped with Xamarin (e.g. /Library/Frameworks/Mono.framework/External/xbuild-frameworks/.NETPortable/v4.5/Profile/Profile49) include MonoTouch10 and MonoAndroid10?
Thank you for your insights.
Update: If you are using the Alpha channel of Xamarin Studio there is no longer a need to copy PCLs from Windows. You can use v4.0, Profile158, this also works out of the box with Async.
Update: I added instructions on how to get async to work in PCL in this article: Xamarin Studio Mac, Portable class library, Async and Android, so go there after this article if you want to work with async in your PCL.
A sort of working solution to the problem I had to get Mvvm+PCL+Xamarin Studio on Mac to work. See below for the details.
Steps
Xamarin Studio
Install .NETPortable into Mono.Framework
Patch Nuget
A patched fork can be found here: https://nuget.codeplex.com/SourceControl/network/forks/takoyakich/nuget/latest, take the 2.7 branch. If you want to patch yourself:
Restart Xamarin Studio if you kept it open.
Test it!
Patch to Nuget.Core.dll:
As of February 2014, the steps above are not needed. Using Xamarin Studio 4.3.2, Alpha channel, and
nuget
addin via addingmrward
's addin repository first and then installing nuget addin, I was able to switch the target top49
and add the HotTuna pack directly to a new PCL project.