Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
588 views
in Technique[技术] by (71.8m points)

visual studio 2012 - MvvMCross 3.0.6 Nuget package installation issue

I am trying to install MVVMCross NuGet package using NuGet 2.5 version. I have added the mono android and touch file to Profile104 folder. Still I am getting following exception:

Attempting to resolve dependency 'MvvmCross.HotTuna.StarterPack (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.HotTuna.CrossCore (≥ 3.0.6)'.
Attempting to resolve dependency 'MvvmCross.PortableSupport (≥ 3.0.6)'.
Installing 'MvvmCross.PortableSupport 3.0.6'.
Successfully installed 'MvvmCross.PortableSupport 3.0.6'.
Installing 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.CrossCore 3.0.6'.
Installing 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Successfully installed 'MvvmCross.HotTuna.StarterPack 3.0.6'.
Installing 'MvvmCross 3.0.6'.
Successfully installed 'MvvmCross 3.0.6'.
Adding 'MvvmCross.PortableSupport 3.0.6' to PortableClassLibrary1.
Uninstalling 'MvvmCross.PortableSupport 3.0.6'.
Successfully uninstalled 'MvvmCross.PortableSupport 3.0.6'.
Install failed. Rolling back...
Could not install package 'MvvmCross.PortableSupport 3.0.6'. 

You are trying to install this package into a project that targets 'portable-win+net45+MonoAndroid16+MonoTouch40+sl40+wp', 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.

I have selected following option when creating a new PCL Library project

enter image description here

Following are the content for the xml files from C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETPortablev4.0ProfileProfile104SupportedFrameworks folder

.NET for Windows Store apps.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier=".NETCore"
    Profile="*"
    MinimumVersion="4.5"
    DisplayName=".NET for Windows Store apps"
    MinimumVersionDisplayName="" />

.NET Framework 4.5

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier=".NETFramework"
    Profile="*"
    MinimumVersion="4.5"
    DisplayName=".NET Framework"
    MinimumVersionDisplayName="4.5" />

MonoAndroid.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="Mono for Android"
  Identifier="MonoAndroid"
  Profile="*"
  MinimumVersion="1.6"
  MaximumVersion="*" />

MonoTouch.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    DisplayName="MonoTouch"
    Identifier="MonoTouch"
    Profile="*"
    MaximumVersion="*" 
    MinimumVersion="4.0" />

Silverlight 4.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier="Silverlight"
    Profile=""
    MinimumVersion="4.0"
    DisplayName="Silverlight"
    MinimumVersionDisplayName="4" />

VSMonoTouch.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework DisplayName="VS MonoTouch"
  Identifier=".NETFramework"
  Profile="*"
  MinimumVersion="1.0"
  MaximumVersion="1.0" />

Windows Phone 7.5.xml

<?xml version="1.0" encoding="utf-8"?>
<Framework
    Identifier="Silverlight"
    Profile="WindowsPhone7*"
    MinimumVersion="4.0"
    DisplayName="Windows Phone"
    MinimumVersionDisplayName="7.5" />

I am using Visual Studio 2012 Ultimate Update 2 on Windows Server 2012 64 bit edition. Can someone point me in right direction.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

It looks like you are targeting Windows Phone 7.0 in your Portable Class Library. Try switching to Windows Phone 7.5 and see if that helps. If not, try posting a screenshot of the PCL "choose targets" screen, as well as the contents of all the XML files you've added to the "SupportedFrameworks" folder.


EDIT: Try deleting VSMonoTouch.xml (and restarting Visual Studio afterwards).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...