I have an app, I have developer over some time, and today I was hoping for a release, but then it was complaining that I had to install Microsoft.NETCore.UniversalWindowsPlatform v 5.3.0, which I did, but then new errors occured.
If I am creating a new blank app, I can only find Microsoft.NETCore.UniversalWindowsPlatform v 5.2.0 in NuGet.
What can I have done wrong?
Microsoft.NETCore.UniversalWindowsPlatform 5.2.0 is released on June 27, 2016. However, according to NuGet.
The owner has unlisted this package. This could mean that the package is deprecated or shouldn't be used anymore.
So it seems we still need to use 5.1.0 version by now. You can force to use 5.1.0 version by using following command.
Install-Package Microsoft.NETCore.UniversalWindowsPlatform -Version 5.1.0
This known issue was posted regarding .NET Core 5.2.0. To workaround this limitation, you can downgrade the version of .NET Core that your project is targeting by right clicking on your project in the solution explorer and selecting "Manage NuGet Packages..."
In the NuGet Package Manager UI, you should be able to browse through all of your NuGet packages. Locate Microsoft.NETCore.UniversalWindowsPlatform, and use the NuGet Package Manager UI to change the version to 5.1.0.
Related
I'm trying to update Bing Ads SDK to version 12.13.5. I am using Visual Studio 2013. Nuget version is 2.12.0.817. When I try to update, I get the following error:
Could not install package 'Microsoft.Extensions.Logging 2.1.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7.2', 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 tried installing Microsoft.Extensions.Logging 3.0.0 (latest version) and get the same error.
I also tried targeting .NET version 4.6.1 and 4.5.2 and got the same error.
For anyone else who may have this problem, the solution was to manually add a package entry
for Microsoft.Extensions.Logging 2.1.1 to packages.config. This allowed the Bing Ads SDK package to update successfully.
As indicated in the docs, your platform needs to be .NETStandard 2.0 or .Net Core 2.1.
The libraries that target .NETStandard2.0, means any .NET Core app that is compatible with the .NET Standard 2.0 can use them, regardless of the .NET SDK they are using.
I updated Xamarin Forms to 3.4.0 on a Xamarin Forms Android project that was working fine. Now I am getting this error when attempting to build. The error is "invalid android support library configuration" and when I look at my Package Console I see this...
...saying that some of my Xamarin.Android.Support.xxx packages need a downgraded package for compatibility. Problems is, my project does not have any of this packages as you can see by my "Packages" folder here...
What am I missing or doing wrong?
This can happen if you update ALL of the nuget packages in a Xamarin.Forms Android project.
Xamarin.Forms has specific dependencies on specific versions of the Xamarin.Android.Support libraries, and if you update ALL of the nuget packages in the Android project, then the support libraries may update to versions later than the versions that the new Xamarin.Forms version supports.
At this point I would uninstall Xamarin.Forms package from the Android project and also uninstall all of the dependent support library packages, which are listed here under "Dependencies": https://www.nuget.org/packages/Xamarin.Forms/
So in the Android project, uninstall the following nugets:
Xamarin.Forms
Xamarin.Android.Support.Design
Xamarin.Android.Support.v4
Xamarin.Android.Support.v7.AppCompat
Xamarin.Android.Support.v7.CardView
Xamarin.Android.Support.v7.MediaRouter
Once uninstalled, just re-install Xamarin.Forms and the correct versions of the support packages should be re-installed.
In the future, just update the Xamarin.Forms packages and that will automatically update the support library packages if necessary, and will not update the support libraries if the newer support library versions are not supported by the updated Xamarin.Forms version.
Updating Xamarin.Forms and all *.Support.* libraries to the latest version worked for me.
You have a version compatibility problem, if you have updated some packages recently, you must go to the package manager "NuGet/Update" you will find all Xamarin packages need update.
I just installed vs 2017 and wanted to run my project but i'm facing so many warning and errors so I realized I should update my xamarin.android nuget packages but I keep getting this error message below:
Severity Code Description Project File Line Suppression State Error Could not install package 'Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2-preview1'. 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. 0
Repairing vs didn't work; deleting nuget.config didn't work; I even changed the version in .csproj file, but when i load the project it goes back to v8.0.
Can anybody please help?
can't update or install any nuget packages in vs 2017
Just as Jon said, the latest nuget package Xamarin.Android.Support.Animated.Vector.Drawable 27.0.2-preview1, which requires MonoAndroid81 at minimum to install.
However, only the latest Preview (15.6 Preview 2) version of Visual Studio includes Android 8.1 support. As this moment, current release version is 15.5.4, preview release version is 15.6 Preview 2. So if you want use that nuget package the latest version 27.0.2-preview1, you need download the latest version of Visual Studio 15.6 Preview 2 and install Android SDK 8.1.
If switch to Visual Studio 15.6 Preview 2 is not your choice, you should not update that package to the latest version, just use the version 26.1.0.1.
Hope this answer more clear.
This requires MonoAndroid81 at minimum to install. You can use the current Preview which includes Android 8.1 support:
https://blog.xamarin.com/xamarin-android-now-double-stuffed-with-oreo-8-1/
For future reference, the support library has a major version that maps with the Android version it supports. In this case Support v27 = Android 8.1 (API 27)
When errors appear, clean your solution and rebuild it.
Also do something very basic, that what you are going to download is "accessible " in .Droid and that is not only in the Portable.
If you do not serve, and do not find a solution, you must start a new project, it would be advisable to install the latest SDK, etc.
When I am trying to upgrade Xamarin.Forms NuGet package from 2.0-2.1 to 2.3.1.114 (latest stable at the moment) I get the following error (even with new blank projects) is there a way to fix it?
Severity Code Description Project File Line Suppression State
Error Could not install package 'Xamarin.Android.Support.v4 23.3.0'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v6.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.
0
Try this option for your project:
This error is most probably because your xamarin forms version is not compatible with Xamarin.Android.Support.v4 23.3.0 available through NuGet. Check this thread on xamarin official forum. As per this thread, 23.3 is not supported by Xamarin forms. On more possible reason is that your xamarin form version is not compatible with the latest update. You can try updating forms to latest version. In case if that doesn't work, then probably you should continue with the version you already have.
I recently decided to update everything in my Xamarin workspace, including all NuGet packages, and Xamarin.Forms.
I first installed all the newest Xamarin.Android.Support packages, which clashed with the current version of Xamarin.Forms that I had, so I decided that I needed to update Xamarin.Forms anyway. I removed it and installed all the other packages (which worked lovely) and now I am trying to reinstall Xamarin.Forms again, but I am receiving:
Unable to resolve dependencies. 'Xamarin.Android.Support.Design 23.4.0.1' is not compatible with 'Xamarin.Forms 2.3.0.107 constraint: Xamarin.Android.Support.Design (= 23.3.0)'.
Any suggestions?
I'm quoting James Montemagno from the Xamarin Forums here.
Xamarin.Forms locks in a very specific version of the support
libraries and google play services. You can't update them because
Xamarin.Forms isn't compatible with them as it would need to be
re-compiled.
Xamarin.Android.Support.v4 (= 23.0.1.3) Xamarin.Android.Support.Design
(= 23.0.1.3) Xamarin.Android.Support.v7.AppCompat (= 23.0.1.3)
Xamarin.Android.Support.v7.CardView (= 23.0.1.3)
Xamarin.Android.Support.v7.MediaRouter (= 23.0.1.3)
See the = 23.0.1.3, which means it is only compatible with that
version number. This is just how NuGet works. When Xamarin.Forms
updates these packages will auto update.
Forms gets 'linked' to a specific version of the Android libraries so it can be guaranteed that it will work together as it should. At this point, Xamarin.Forms (stable) isn't updated yet to use the latest Android Support packages. So you probably want to go with a somewhat older version of Forms, or check if there is a Forms pre-release which already has a reference to the newer Android Support libraries.
Of course; using these is not recommended in a production environment.
They added it in the official FAQ
You can't update Xamarin.Forms and Xamarin.Android at the same time. As It has dependency issues with versions.
So first, Select only Xamarin.Forms 2.3.0.107 and update.
After that, Select rest of the Xamarin.Android.support lists and update.
I would extremelly recommend by 1 year of experience with Xamarin.Droid and Xamarin.iOS to only update Xamarin.Forms to latest version, and ignore Other Xam.Support Libraries unless is extremelly necessary to bug fix something that you need.
Reason #1: It is not fully tested by Microsoft.
Reason #2: You might need to spend hours configuring and fixing the references e version compatibility.
According to me own experience, I would recommend to:
If your project is very old, try to migrate the list of your packages from packages.config to the .CSPROJ. Unlike packages.config, PackageReference lists only those NuGet packages you directly installed in the project. As a result, the NuGet Package Manager UI and the project file aren't cluttered with down-level dependencies. More info here
Clean the Nuget packages cache(s) : Tools -> NuGet Package Manager -> Package Manager Settings -> Clear All NuGet Cache(s)
Use the NuGet Console to get more details about you errors. Open the console (Tools -> NuGet Package Manager -> Package Manager Console), then type Update-Package
Always Clean and Rebuild after updating your packages
For Resolution follow below steps
Close Visual Studio and Navigate following Folder
C:\Users\\AppData\Local\Xamarin
and Remove “ Zib “ Folder
(it will re-create automatically while build solution )
Right Click
on Your Solution /Project ➔ manage nuget Package➔ Click on Update
tab ➔ Update Xamarin Form
Restart Visual studio⇒Open project ==>
Clean Solution and build Add your Nuget package Now
Refered from : https://xamarininterviewquestion.blogspot.in/2016/12/upgrade-nuget-xamarinandroidsupportdesi.html
Starting with Xamarin.Forms 2.3.4 you can manually update all the Xamarin.Android.Support NuGet packages. The condition is that the Target Framework and the Target Android version options of your project (if you don't know what I'm talking about check out this page: Understanding Android API Levels) are set to at least Android 7.0, i.e API 24, or higher.
The official Xamarin documentation has also been updated: Xamarin Forms Troubleshooting