Base solution for your next web application
Open Closed

Unable to update Mobile solution NuGet package. #4888


User avatar
0
timmackey created

Unable to update NuGet package Xamarin.Android.Support.Design for Mobile solution.

The following error occurs: Could not install package 'Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v8.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.


5 Answer(s)
  • User Avatar
    0
    alper created
    Support Team

    don't update Xamarin.Android.* packages. Those are all dependent to Xamarin.Forms package. Update only Xamarin.Forms and it will find the packages that it needs and installs them. Don't do upgrade all in NuGet when using Xamarin.Forms. (Xamarin is a bit different than other projects.)

    <a class="postlink" href="https://forums.xamarin.com/discussion/comment/216322/#Comment_216322">https://forums.xamarin.com/discussion/c ... ent_216322</a>

  • User Avatar
    0
    timmackey created

    Download the PhoneBookDemo project. Open Acme.PhoneBookDemo.Mobile.sln in Visual Studio 2017. Manage NuGet Packages for solution. Select 'Updates (50)'. Select and check only 'Xamarin.Forms'. Click 'Update'.

    Package Manager log: Resolving dependency information took 0 ms Resolving actions install multiple packages

    Attempting to gather dependency information for multiple packages with respect to project 'src\Acme.PhoneBookDemo.Mobile.Droid', targeting 'MonoAndroid,Version=v8.0' Gathering dependency information took 11.34 sec Attempting to resolve dependencies for multiple packages. Resolving dependency information took 0 ms Resolving actions install multiple packages Retrieving package 'Xamarin.Forms 2.5.0.280555' from 'nuget.org'. Removed package 'Xamarin.Forms 2.5.0.91635' from 'packages.config' Successfully uninstalled 'Xamarin.Forms 2.5.0.91635' from Acme.PhoneBookDemo.Mobile.iOS Adding package 'Xamarin.Forms.2.5.0.280555' to folder 'C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\packages' Added package 'Xamarin.Forms.2.5.0.280555' to folder 'C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\packages' Added package 'Xamarin.Forms.2.5.0.280555' to 'packages.config' Successfully installed 'Xamarin.Forms 2.5.0.280555' to Acme.PhoneBookDemo.Mobile.iOS Executing nuget actions took 8.4 sec Found package 'Xamarin.Forms 2.5.0.280555' in 'C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\packages'. Removed package 'Xamarin.Forms 2.5.0.91635' from 'packages.config' Successfully uninstalled 'Xamarin.Forms 2.5.0.91635' from Acme.PhoneBookDemo.Mobile.Droid Package 'Xamarin.Forms.2.5.0.280555' already exists in folder 'C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\packages' Install failed. Rolling back... Package 'Xamarin.Forms 2.5.0.280555' does not exist in project 'Acme.PhoneBookDemo.Mobile.Droid' Package 'Xamarin.Forms 2.5.0.91635' already exists in folder 'C:\PhoneBookDemo\PhoneBookDemo\aspnet-core\packages' Added package 'Xamarin.Forms 2.5.0.91635' to 'packages.config' Executing nuget actions took 2 min This collection is read-only. Time Elapsed: 00:02:23.2623017 ========== Finished ==========

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @TimMackey,

    We are dealing with the same problem. It is the only issue preventing v5.3 release. Once we have done, we will release v5.3.

  • User Avatar
    0
    timmackey created

    Successfully merged all v5.3 changes. There are still 19 Xamarin-specific packages waiting updates. When attempting to upgrade any single package or multiple packages, a similar error message keeps appearing:

    "You are trying to install this package into a project that targets 'MonoAndroid,Version=v8.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."

    Can you provide an estimate when this will be resolved? (for our project implementation planning)

  • User Avatar
    0
    alper created
    Support Team

    <cite>TimMackey: </cite> Successfully merged all v5.3 changes. There are still 19 Xamarin-specific packages waiting updates. When attempting to upgrade any single package or multiple packages, a similar error message keeps appearing:

    "You are trying to install this package into a project that targets 'MonoAndroid,Version=v8.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."

    Can you provide an estimate when this will be resolved? (for our project implementation planning)

    Please do not apply upgrades for existing Xamarin packages. If you upgrade a Xamarin.Forms dependent package higher than the compatible version this will break your application. Zero Team upgraded the necessary packages.

    Read the v5.3.0 Release notes
    <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/releases/tag/v5.3.0">https://github.com/aspnetzero/aspnet-ze ... tag/v5.3.0</a>

    [attachment=0:35496od6]xamarin-package-update-notice.jpg[/attachment:35496od6]

    These are ongoing discussions: <a class="postlink" href="https://bugzilla.xamarin.com/show_bug.cgi?id=61113">https://bugzilla.xamarin.com/show_bug.cgi?id=61113</a> <a class="postlink" href="https://github.com/NuGet/Home/issues/6468">https://github.com/NuGet/Home/issues/6468</a>