What version of .NET do PCL project build against?

I have a PCL project in Xamarin Studio and I would like to use .NET 4.5 class IReadOnlyCollection, but it isn't defined.

Is this because PCL projects build again .NET 4.0, and if so, is .NET 4.5 in the pipeline?

Posts

  • CheesebaronCheesebaron DKInsider, University mod

    It is built against a subset, which works on all the targeted platforms. So, I.e. if you have chosen WP7 as one of your targets, you might not get the IReadOnlyCollection etc.

  • RupertRawnsleyRupertRawnsley GBMember ✭✭✭

    I've only got ".NET Framework 4" and "Silverlight 4" selected (I also tried to ditch Silverlight, but the tick keeps coming back). I assume this is should give me the maximum compatibility, but I still don't see IReadOnlyCollection.

  • CheesebaronCheesebaron DKInsider, University mod

    .NET 4 != .NET 4.5 You just said what the problem is.

  • RupertRawnsleyRupertRawnsley GBMember ✭✭✭

    @Cheesebaron I suspected as much, although labelling it "4.0" would have been clearer.

    How about the second part of my question: is .NET 4.5 support for PCL projects due soon?

  • CheesebaronCheesebaron DKInsider, University mod

    When I create PCL projects in VS2012 I have .NET 4.5 and .NET 5?

  • RupertRawnsleyRupertRawnsley GBMember ✭✭✭

    I don't get that in Xamarin Studio. The PCL project options are shown in the attached screenshot.

Sign In or Register to comment.