I'm using Xamarin.Forms.Maps and Microsoft.AppCenter.Push in my PCL project. Lately I tried to update my Push to latest version, but it's clashing with the Maps because different version of Xamarin.GooglePlayServices.Base is expected.
Severity Code Description Project File Line Suppression State Error
NU1107 Version conflict detected for Xamarin.GooglePlayServices.Base.
Install/reference Xamarin.GooglePlayServices.Base 71.1610.0 directly
to project XXX.Android to resolve this issue.
XXX.Android -> Microsoft.AppCenter.Push 2.5.0 ->
Xamarin.Firebase.Messaging 71.1740.0 -> Xamarin.Firebase.Iid 71.1710.0
-> Xamarin.Firebase.Iid.Interop 71.1601.0 -> Xamarin.GooglePlayServices.Base (>= 71.1610.0)
XXX.Android -> Xamarin.Forms.Maps 4.3.0.947036 ->
Xamarin.GooglePlayServices.Maps 60.1142.1 ->
Xamarin.GooglePlayServices.Base (= 60.1142.1).
Push is expecting version 71 while Maps is expecting version 60. May I know how to resolve this and I'm curious why cannot the Maps use the later version? Is it not backward compatible?
Thank you.
Yes, I have reproduce this problem as you said.
Accoriding to the error log, we know that the problem is that though the Xamarin.Forms.Maps Nuget have been updated to a newer version, but the package (Xamarin.GooglePlayServices.Base) in this nuget hasn't been updated synchronously to the later version( 71.1610.0). It should be an issue of this Nuget. And we can report it as a bug here: https://github.com/xamarin/Xamarin.Forms/issues
For now, in order to keep the code working properly,what we can do is keep the two Nuget versions in sync.
Just install nuget Microsoft.AppCenter.Push 2.1.1 and nuget Xamarin.Forms.Maps 4.3.0.947036.
EDITED
If you read the comments, there is one saying that you can install dependencies manually.
In this case, by visiting the NuGet repo for Xamarin.Forms.Maps you can see in the dependencies list that it requires Xamarin.GooglePlayServices.Maps.
Just make sure you already have dependencies installed, or simply add them to your Android solution (I added also Xamarin.Android.Support.v7.AppCompat).
By following these steps, I'm able to run both Xamarin.Forms.Maps (v4.4.0.991477) and Microsoft.AppCenter.Push (v2.6.4).
There is an issue on the GitHub relate repo and seems to be fixed.
Refer to following link please
NuGet version conflict between Xamarin.Froms.Maps and Microsoft.AppCenter.Push
You can check the whole evolution of the issue.
Related
I have a Xamarin Forms Project - the Android project targets API 28 (Pie) and uses packages.config for the nuget references. All of the packages have a targetFramework="monoandroid90". The project compiles and runs correctly.
I want to migrate to using PackageReference, so I use the Migrate packages.config to PackageReference option.
After this completes I try to build the project and receive an error regarding a missing package:
Xamarin.Android.Support.Annotations.28.0.0.1
Looking in the packages folder, I can see that none of the Xamarin.Android.Support packages have been downloaded and I can't get them to download - even by reinstalling the package.
I also noticed that the csproj file reference monoandroid81 for all the nugets, even though the packages.config used monoandroid90
Has anyone had a similar difficulty after migrating?
Builds fine locally but getting following error on VSTS build server. Issue is clear but not able to resolve it.
018-07-18T19:41:24.6993903Z ##[error]The nuget command failed with exit code(1) and error(NU1107: Version conflict detected for Microsoft.AspNetCore.Http.Abstractions. Reference the package directly from the project to resolve this issue.
webapi.admin -> Microsoft.AspNetCore.Cors 2.1.1 -> Microsoft.AspNetCore.Http.Extensions 2.1.1 -> Microsoft.AspNetCore.Http.Abstractions (>= 2.1.1)
webapi.admin -> Microsoft.AspNetCore.App 2.1.0 -> Microsoft.AspNetCore.Http.Abstractions (= 2.1.0).
Can you upgrade Microsoft.AspNetCore.App to version 2.1.1?
Or just upgrade all your nuget references to the latest version? (2.1.2 for these)
As for building locally working, try cleaning, or create a fresh clone of the source control repo and see if that works.
Explicitly setting the version attribute resolved it, changed:
<PackageReference Include="Microsoft.AspNetCore.App" />
to
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.1.1" />
More details here: https://github.com/aspnet/Universe/issues/1180#issuecomment-392180608
I was dealing with these issues too but it was because I simply copied a deployment YAML file from somewhere else and did not use the proper tooling. After following this tutorial, it worked like a charm:
https://learn.microsoft.com/en-us/azure/devops/pipelines/languages/dotnet-core?view=azure-devops
More specifically, I think using the dotnet restore to restore your packages might fix it:
steps:
- script: dotnet restore
Make sure to install the correct .NET Core SDK, too.
steps:
- task: DotNetCoreInstaller#0
inputs:
version: '2.1.300' # replace this value with the version that you need for your project
ASP.NET 4.5.1 or 4.5.2
Updating Nuget package MicrosoftAspNet.Identity.EntityFramework from version 2.2.1 to version 3.0.0-rc1-final
I get the following error:
Failed to add reference. The package 'Microsoft.AspNet.Identity.EntityFramework' tried to add a framework reference to 'System.Runtime' which was not found in the GAC. This is possibly a bug in the package. Please contact the package
owners for assistance.
I had a similar issue with another package.
I "solved" it adding a manually reference to missed library, updating the package and then removing the reference added manually:
On your project go to References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on: C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
Add, update and then remove.
I know, it is not a solution, but it will allow you continue working until get a real solution.
I had the same issue, but adding the MySQL package to my project.
The way that i solved was just very closely to the answer given by Sebastián Guerrero.
So i will be adding a manually reference to that missed library (system.runtime) and than installed the MySQL package and it works perfectly.
ATTENTION: I only unnistall the system.runtime package after installing the MySQL.
References -> Add Reference... and then click on Browse...
On my installation (Windows 10), your file is located on:
C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Runtime\v4.0_4.0.0.0__b03f5f7f11d50a3a\System.Runtime.dll
I had the same issue when running Install-Package Microsoft.Azure.Management.Fluent on .NET framework 4.5.2
Solved the issue with the following steps:
Installed Microsoft.Rest.ClientRuntime latest version from Nuget.
After that, installed latest version of Microsoft.Azure.Management.Fluent from Nuget.
I had this problem when I opened the project after a while.
The problem was it was originally built with Microsoft.Net.Compilers.2.4.0 and I was on 3.3.1.
The project strangely added two required Imports to the .csproj file, one for the 2.4.0 compiler,and a duplicate for the 3.3.1 version. I just needed to:
Right click on the project file
Unload the project
Edit the csproj file
Remove the 2.4.0 references (was also a reference in an Error element)
Close file
Right click on project, reload file.
Rebuild All
I have ported my windows 8.1 app to UWP app and now when I try to install googleanalyticssdk into my app in visual studio 15 from nuget package manager I get the following error
Error:
Failed to add reference to GoogleAnalytics.Core
I have tried many solutions such as uninstalling other versions etc etc but none of them seem to work for me. What might be the reasons please suggest.
Please follow these steps to install packages:
Right click the solution
Choose "Manage Nuget Packages..."
Search "GoogleAnalyticsSDK"
Install version 1.3.0
If you still see such exception, please show us the Output from Package Manager, for example:
As karann mentioned, please also try the result of a blank UWP app, if it works, we need to focus on your existing project.
I downloaded a tab plugin for qt-creator, called "TabbedEditor". It needs two dependent libs. Where can I get them?
-- warning message:
Could not resolve dependency 'Core(3.0.0)' Could not resolve
dependency 'TextEditor(3.0.0)'
thank you
The "TextEditor" is part of the Qt Creator core. You already have it (check with About->Plugins), but likely not the 3.0.0 version this "TabbedEditor" plugin requires.