Adding MVVMCross Nuget package to Xamarin iOS fails on VS2015 RC
Asked Answered
A

3

6

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!

Amok answered 10/5, 2015 at 5:34 Comment(0)
I
5

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.

Inactive answered 25/8, 2015 at 19:48 Comment(1)
You are correct that 4.0.0 is targeting VS2015. It also has support for UWP and more stuff. Check out the website for more info: mvvmcross.comAlienism
A
3

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.

Amok answered 14/5, 2015 at 14:42 Comment(0)
B
2

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.

Britteny answered 13/5, 2015 at 14:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.