Question

There are many reports that MvvmCross can be installed at Profile 78, but in my environment it can't.

When I try to install MvvmCross from Nuget manager, I get the following message:

Could not install package 'MvvmCross.PortableSupport 3.1.1'. You are trying to install this package into a project that targets 'portable-Profile78', 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. System.InvalidOperationException: Could not install package 'MvvmCross.PortableSupport 3.1.1'. You are trying to install this package into a project that targets 'portable-Profile78', 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.

Environmrnt is:

=== Xamarin Studio ===

Version 4.2.4 (build 35) Installation UUID: 7b4d01c4-ec8d-4fd7-bcf3-46ea74a47d8b Runtime:
    Mono 3.2.6 ((no/9b58377)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 302060000

=== Apple Developer Tools ===

Xcode 5.1.1 (5085) Build 5B1008

=== Xamarin.iOS ===

Version: 7.2.1.42 (Business Edition) Hash: 773c77c Branch:  Build date: 2014-04-18 15:39:16-0400

=== Xamarin.Mac ===

Xamarin.Mac: Not Installed

=== Xamarin.Android ===

Version: 4.12.3 (Business Edition) Android SDK: /adt-bundle-mac/sdk
    Supported Android versions:
        2.1   (API level 7)
        2.2   (API level 8)
        2.3   (API level 10)
        3.1   (API level 12)
        4.0   (API level 14)
        4.0.3 (API level 15)
        4.1   (API level 16)
        4.2   (API level 17)
        4.3   (API level 18)
        4.4   (API level 19) Java SDK: /usr java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18) Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)

=== Build Information ===

Release ID: 402040035 Git revision: 1173cb1c45bc56cb702e82cd21a7c9d0cea4acbf Build date: 2014-04-17 13:45:52-04 Xamarin addins: 53bde0041263928e8bd64686f5ca5a8e4338dd76

=== Operating System ===

Mac OS X 10.9.2 Darwin ootsuka-no-MacBook-Air.local 13.1.0 Darwin Kernel Version 13.1.0
    Wed Apr  2 23:52:02 PDT 2014
    root:xnu-2422.92.1~2/RELEASE_X86_64 x86_64

and Nuget manager is 0.9, latest version.

My attempt at the solution:

  • I updated all Xamarin component, XS, Mono, XA and XiOS. But it isn't able to solve the problem.
  • I uninstall Nuget manager and reinstall it- didn't solve the problem.
  • I made PCL project in Profile 7, then installing MvvmCross succeeded.
    So I changed project to Profile 78, and change package.config manually.
    This worked well both in iOS and Android, but I tested it only in example code.

Can someone suggest a better way of solving this problem?

Was it helpful?

Solution

It looks like you do not have the PCL profile 78 installed for some reason.

I am basing this on the fact that I would expect the error message reported by NuGet to include the framework names and not use the profile name. For example when I try to install Microsoft.AspNet.Razor 3.1.2 into a project that targets Profile 78 I get the error:

Could not install package 'Microsoft.AspNet.Razor 3.1.2'. 
You are trying to install this package into a project that targets 
'portable-net45+wp80+win+MonoAndroid10+MonoTouch10'.

I can install MvvmCross.PortableSupport 3.1.1 into a project that targets the PCL profile 78 using Xamarin Studio 4.2.4 and Mono 3.2.6 on the Mac.

You could try re-installing Mono to try and fix this. However you said you tried that already.

I also have an simple C# console application that you can use to display the PCL profiles installed on your machine. The output from this on my Mac with Mono 3.2.6 installed is:

.NETPortable root path found: /Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/4.5/../xbuild-frameworks/.NETPortable

.NETPortable profiles:
Profile136 net40+sl50+wp80+win+MonoAndroid10+MonoTouch10
Profile14 net40+sl50+MonoAndroid10+MonoTouch10
Profile147 net403+sl50+wp80+win+MonoAndroid10+MonoTouch10
Profile158 net45+sl50+wp80+win+MonoAndroid10+MonoTouch10
Profile19 net403+sl50+MonoAndroid10+MonoTouch10
Profile24 net45+sl50+MonoAndroid10+MonoTouch10
Profile37 net40+sl50+win+MonoAndroid10+MonoTouch10
Profile42 net403+sl50+win+MonoAndroid10+MonoTouch10
Profile47 net45+sl50+win+MonoAndroid10+MonoTouch10
Profile5 net40+win+MonoAndroid10+MonoTouch10
Profile6 net403+win+MonoAndroid10+MonoTouch10
Profile49 net45+wp80+MonoAndroid10+MonoTouch10
Profile7 net45+win+MonoAndroid10+MonoTouch10
Profile78 net45+wp80+win+MonoAndroid10+MonoTouch10

You can also take a look at the /Library/Frameworks/Mono.framework/Versions/3.2.6/lib/mono/xbuild-frameworks/.NETPortable directory and see what profiles are in there.

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