Search code examples
mvvmcrossvisual-studio-mac

How to update MvvmCross?


I am using Visual Studio for Mac. I have MvvmCross v5.1.1 installed in my project. I want to update it (and all its dependencies and plugins) to v.5.3.1. But I get this error message in the output when I try to update my packages:

Unable to resolve dependencies. 'MvvmCross.Binding 5.3.1' is not compatible with 'MvvmCross.Droid.Shared 5.1.1 constraint: MvvmCross.Binding (= 5.1.1)'.


Solution

  • With MvvmCross version 5.2+ MvvmCross.Droid.Shared has been removed.

    From MvvmCross blog release notes

    As the nuget package MvvmCross.Droid.Shared no longer exists, please force remove it first, and then update the rest of the packages.


    Visual Studio

    You can run the following command in your Package Manager Console to remove it (Make sure that the default project dropdown is set to your Android project)

    PM> Uninstall-Package MvvmCross.Droid.Shared -Force

    Visual Studio for Mac

    You can install NuGet Package Management Extensions addin (You can get the latest version of the addin from Github). Then execute the following command from the PowerShell Console Window (Make sure you have closed and re-opened IDE after the addin has been installed before trying to open the PowerShell Console)

    PM> Uninstall-Package MvvmCross.Droid.Shared -Force