Adding MVVMCross Nuget package to iOS Xamarin fails on VS2015 RC

I tried to create a completely 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 error message:

Error Failed to install the package "MvvmCross.PortableSupport 3.5.1". You are trying to install this package in a project whose purpose is "Xamarin.iOS, Version = v1.0", but the package does not contain links to assemblies or content files compatible with this infrastructure. For more information, contact the author of the package.

I looked through the folder C: \ Program Files (x86) \ Reference Assemblies \ Microsoft \ Framework.NETPortable \ v4.5 \ Profile \ Profile78 \ SupportedFrameworks and Xamarin.iOS.Unified.xml. I looked through any related articles, and none of the fixes seem to work on VS2015RC, so I guess I could be one of the first to hit it and ask for help!

+6
source share
3 answers

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

Today I checked the test using the preliminary version of MvvmCross 4.0.0 Beta 2 and was able to successfully install the packages using VS2015. I am still learning the framework, but it looks like MvvmCross 4.0.0 is intended to be installed on VS2015 (it was even built using VS2015).

If someone else is using VS2015 and encounters the problem described above, follow these steps to solve the problem with the beta version of MvvmCross v4:

  • Go to Tools> NuGet Package Manager> Manage NuGet Package Solutions.
  • Check the box next to "Enable pre-scan."
  • Search for MvvmCross.HotTuna.MvvmCrossLibraries.
  • Select the 4.0.0-beta2 library (with the logo of the new gold badge).

This must be successfully installed for iOS and Android projects in VS2015. Hope this helps.

+5
source

Thanks for the tip, I went and installed VS2013 on this new machine, opened the project and updated the packages through the Nuget package manager, and it worked perfectly. After that, the update project was opened in VS2015. This should be the problem between the MVVMCross package and the Nuget VS2015RC extension.

+3
source

I had a similar problem with an Android project. I found that if I open the solution in Xamarin Studio, I can add the MVVMCross package using the menu Add-> Add Nuget Packages ... Reopened in Visual Studio and it seemed to work after clearing some of the β€œextra” ones that adds Xamarin Studio.

Of course, this is just a workaround, but you can go.

Good luck.

+2
source

Source: https://habr.com/ru/post/986904/


All Articles