0

We are creating a new iOS project. I want to use the Universal API so pretty sure I need to switch to Xamarin Beta channel and pull the prerelease of MVVMCross.

However when I try and add the MVVMCross package to a fresh PCL I get

Could not install package 'MvvmCross.PortableSupport 3.5.0-beta1'. You are trying to install this package into a project that targets 'portable-net45+sl50+Xamarin.iOS10+MonoAndroid10+MonoTouch10', 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 error looks simple enough but those compatibility errors from NuGet are never as simple as they look

The PCL is targetting

  • .NET 4.5
  • Silverlight 5
  • Xamarin Android
  • Xamarin.iOS
  • Xamarin.iOS (Classic)

Which targets do I need to change so I can add the correct MVVMCross to build Universal iOS

Martijn00
  • 3,569
  • 3
  • 22
  • 39
Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68

2 Answers2

2

It looks like Your challenge is supporting Silverlight 5 - sl50

All the other platforms you list will support modern PCL profiles like 78 and 259. However, Microsoft haven't built any Silverlight support for these profiles.

This dropping of the "older profiles" is why MvvmCross dropped the old WindowsPhone support - announced back in July 2013 http://slodge.blogspot.co.uk/2013/07/mvvmcross-wp7-tombstoned.html

Stuart
  • 66,722
  • 7
  • 114
  • 165
  • 1
    I don't care for SL5 and have tried unticking it but I get the "The following will be automatically targeted" message so it configures it anyway. I have tried unticking everything other than .NET 4.5 and Xamarin.iOS and still get compat errors. – Pat Long - Munkii Yebee Dec 16 '14 at 12:38
  • SL5 is your problem... Options: 1. Edit the targeted profile number yourself in the csproj file; 2. Look through the reference assembly folders to see what is installed in what profile on your PC; 3.tag your question with `xamarin` and `Portable-class-library` and hope one of the PCL gurus can assist you. – Stuart Dec 16 '14 at 12:45
  • Retagged and hacking about with csproj now. Thanks Stuart – Pat Long - Munkii Yebee Dec 16 '14 at 13:35
  • It would not let me simply change to Package 259. It kepy saying "Update required" against the project. I needed to also change the TargetFrameworkVersion. See this answer, http://stackoverflow.com/a/26127667/63286. Stuart it might be worth you editing your answer to mention the framework version to – Pat Long - Munkii Yebee Dec 16 '14 at 13:48
0

I fixed the problem you had. I managed to fix it without hacking csproj. I couldn't deselect Silverlight 5. I selected Windows 8 target and then I was able to deselect Silverlight 5.