Question

I'm unable to create a new Portable Class Library project which targets either the Xamarin.Android or Xamarin.iOS frameworks. When I do so, I get an error message that says there is no available functionality that is portable between the frameworks selected, regardless of the other frameworks I have chosen(i.e. Windows 7.5 and higher, like Stuart Lodge selects in his Days of MvvmCross videos).

Ultimately, I'd like to be able to use MvvmCross with it, and it seems as though some updates to either Visual Studio or the Xamarin frameworks broke my existing setup - it used to run fine with the Mono frameworks, but then something changed and it no longer works. I created a new VM for my setup to make sure it's clean(my host system has 2010 as well, and I was concerned that something broke between the two versions).

(If any of this helps)

In the virtual machine, I'm running:

-Visual Studio 2012 Ultimate, Update 4 (v4.50709)

-Project Linker 2012(v1.5); this was suggested in some Xamarin Docs about the PCLs

-Nuget v2.8.50313.31

-Xamarin.Android v4.12.2001

-Xamarin.iOS v1.10.47

I've scoured previous SO threads that mention placing the following two Framework XML files: MonoTouch MonoForAndroid

in the following path: C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile104\SupportedFrameworks

This worked previously, but in the VM I've noticed two things: -Profile104 doesn't exist in the v4.5 path -Profile104 exists in the v4.0 path, but when I click on either "Mono for Android", or "MonoTouch", it simply closes the dialog box as though I had clicked "Cancel."

Could someone kindly tell me what I've missed?

Thanks!

I've come across this thread here: Unable to add Xamarin.Android and Xamarin.iOS to PCL

Which suggests using .Net Framework 4.5, Silverlight 5, Windows Phone 8, .Net for Windows Store, Xamarin.Android, and Xamarin.iOS(along with other combinations of the first 3 options), but to no avail.

Was it helpful?

Solution

By default when you create PCL next frameworks are selected:

.NET Framework 4.5
Silverlight 4 and higher
Windows Phone 7 and higher
.NET for Windows Store apps

So in the latest version Xamarin, only Windows Phone 8 and Silverlight 5 can be selected with Xamarin.iOS and Xamarin.Android (if you need those, but you can also not select them).

Also about Profile104 that trick doesn't work with new version of Xamarin as there are no such frameworks as MonoTouch or MonoDroid in it, there are Xamarin.iOS and Xamarin.Android instead.

So in this thread - Unable to add Xamarin.Android and Xamarin.iOS to PCL - Stuart suggested which target frameworks to select when you creating new PCL.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top