Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding MVVMCross Nuget package to Xamarin iOS fails on VS2015 RC

I have attempted to create a brand new Xamarin iOS project with a PCL project in VS2015RC and when I try to add the MVVMCross package to the Xamarin iOS project, I get the following failure message:

Error Could not install package 'MvvmCross.PortableSupport 3.5.1'. You are trying to install this package into a project that targets 'Xamarin.iOS, Version=v1.0', 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 looked in the C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETPortable\v4.5\Profile\Profile78\SupportedFrameworks folder and Xamarin.iOS.Unified.xml is there. I have looked at any similar articles and none of the fixes seem to be working for VS2015RC so I am guessing I may be one of the first to hit it and ask for help!

like image 648
Daniel Smith Avatar asked May 10 '15 05:05

Daniel Smith


3 Answers

I ran into this problem yesterday in Android and iOS projects using VS2015 Enterprise and MvvmCross 3.5.1. I was unable to add the NuGet packages in VS2015 and had to use Xamarin Studio to get the packages installed.

Today I ran a test utilizing the prerelease MvvmCross 4.0.0 Beta 2 and was able to successfully install the packages using VS2015. I'm still learning the framework, but it looks like MvvmCross 4.0.0 is meant to target VS2015 (it was even built using VS2015).

In case anyone else is using VS2015 and runs into the issue above, here are the steps to resolve the problem with the beta release of MvvmCross v4:

  1. Open Tools > NuGet Packet Manager > Manage NuGet Packages for Solution.
  2. Check the checkbox "Include prerelease".
  3. Search for MvvmCross.HotTuna.MvvmCrossLibraries.
  4. Select the 4.0.0-beta2 library (one with the new golden badge logo).

This should successfully install to iOS and Android projects in VS2015. Hope this helps.

like image 97
C0D3Name Avatar answered Sep 22 '22 01:09

C0D3Name


Thank you for the feedback, I went ahead and installed VS2013 on this new machine and opened the project and updated the packages via Nuget Package manager and it worked fine also. Then opened the update project in VS2015 just fine. It must be issue between MVVMCross package and VS2015RC Nuget Extension.

like image 38
Daniel Smith Avatar answered Sep 22 '22 01:09

Daniel Smith


I ran into a similar issue with an Android project. I found that if I opened the solution in Xamarin Studio I could add the MVVMCross package using the Add->Add Nuget Packages.. menu there. Re-opened in Visual Studio and it seemed to work after cleaning up some of the 'extras' that Xamarin Studio adds in.

Certainly is only a workaround, but might get you going.

Good luck.

like image 40
erin Avatar answered Sep 21 '22 01:09

erin