Unable to installl Xamarin.Azure.NotificationHub.Android nuget to existing project - xamarin.forms

I got the following error when I was trying to install Xamarin.Azure.NotificationHub.Android nuget package to my existing xamarin.forms project.
One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Lifecycle.LiveData (>= 2.1.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.Google.Android.Material (>= 1.0.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Legacy.Support.V4 (>= 1.0.0)', 'Xamarin.Forms 4.5.0.617 constraint: Xamarin.AndroidX.Browser (>= 1.0.0)'
Unable to find a version of 'Xamarin.Android.Arch.Core.Common' that is compatible with 'Xamarin.Android.Arch.Core.Runtime 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)', 'Xamarin.Android.Arch.Lifecycle.LiveData 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)', 'Xamarin.Android.Arch.Lifecycle.LiveData.Core 1.1.1.3 constraint: Xamarin.Android.Arch.Core.Common (= 1.1.1.3)'.
But my project already has Xamarin.Android.Arch.*** 1.1.1.3 installed.
I had no issue when installing Xamarin.Azure.NotificationHub.Android nuget to a fresh project. The error occurs when installing to one my existing Xamarin.Forms project which already uses AppCenter.
Is this because of some package dependency conflict? If so, how to resolve it?

Xamarin.Azure.NotificationHub.Android (1.1.1) package uses Xamarin.GooglePlayServices.Base (>= 70.x.x) and Xamarin.Firebase.Messaging (>= 70.x.x) as dependencies. One of the packages installed on the project also depends on Xamarin.GooglePlayServices.Base package. Xamarin.Azure.NotificationHub.Android (1.1.1) package needs a higher version of GooglePlayservices.Base (>= 70.x.x)package. Since my project uses a package.config file to manage installed packages, the existing package already installed a lower version of GooglePlayservices.Base package (60.x.x).
I was able to resolve this issue in 2 ways:
Uninstall the package which creates the conflict with all its dependencies. Then reinstall the package with setting Dependency Behavior as Lowest. Then I was able to install NotificationHub.Android package without any errors.
Migrate from package.config to new PackageReference format. In this way, it's easier to see what are the packages directly installed on the project and don't have to worry about dependencies. This also shows which packages create the conflict. Fixed the issue as the error log suggested.
NU1107: Version conflict detected for Xamarin.GooglePlayServices.Basement. Install/reference Xamarin.GooglePlayServices.Basement 71.1620.4 directly to project XXX to resolve this issue.
XXX -> Xamarin.Azure.NotificationHubs.Android 1.1.1 -> Xamarin.Firebase.Messaging 71.1740.4 -> Xamarin.GooglePlayServices.Basement (>= 71.1620.4)

Related

install_keras() in RStudio, tensorflow 2.4.0 requires gast==0.3.3, but you have gast 0.4.0 which is incompatible

I am trying to work with the keras library in RStudio to use the keras_model_sequential() function but can't overcome the following error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.4.0 requires gast==0.3.3, but you have gast 0.4.0 which is incompatible.
tensorflow 2.4.0 requires grpcio~=1.32.0, but you have grpcio 1.38.0 which is incompatible.
tensorflow 2.4.0 requires h5py~=2.10.0, but you have h5py 3.1.0 which is incompatible.
When I install the version that is proposed in the error message in the terminal, I'm getting the same error the other way around:
(env) (base) ➜ env pip install gast==0.3.3
Collecting gast==0.3.3
Using cached gast-0.3.3-py2.py3-none-any.whl (9.7 kB)
Installing collected packages: gast
Attempting uninstall: gast
Found existing installation: gast 0.4.0
Uninstalling gast-0.4.0:
Successfully uninstalled gast-0.4.0
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.5.0 requires gast==0.4.0, but you have gast 0.3.3 which is incompatible.
Does anyone have experience with this? Any kind of help is highly appreciated!
I think that this has been resolved in more recent versions of keras/tensorflow. In most cases, this should work:
install.packages("keras")
reticulate::install_miniconda()
keras::install_keras()
In cases where you are trying to use reuse a previous python environment that has some conflicting dependencies (likely the cause of your observed error message), you can temporarily workaround most of them by passing pip_ignore_installed = TRUE:
keras::install_keras(pip_ignore_installed = TRUE)

error NU1102: Unable to find package Microsoft.AspNetCore.Localization with version (>= 2.2.0)

In my build pipeline, I have a step as follows:
SDK version I'm using in global.json is 3.1.201". With this, when I try to create a build, I get the following error:
error NU1102: Unable to find package Microsoft.AspNetCore.Localization with version (>= 2.2.0)
error NU1102: - Found 9 version(s) in Microsoft Visual Studio Offline Packages [ Nearest version: 1.1.3 ]
I don't know if this is related sdk version. Can someone help with fixing this issue?
Adding this step and also adding the step NUGET Installer before and switching from visual_studio 2017 to windows 2019 as the build agent solved the problem for me.
Strangely when creating a new pipeline from template "Azure function" the Nuget Restore step is missing...
Can you add step to restore nuget packages. I don't see this one on attached screen.

Julia Package dependencies in Travis CI

I am trying to use Travis on a package of mine (UnivariateFunctions) that depends on another package (SchumakerSpline). The build always fails, apparently because it cannot access SchumakerSpline. SchumakerSpline can be installed from github to my local machine via REPL so it is not clear what the problem with this package is.
What can cause an error of this sort and more generally what are the required steps for using Travis to test a Julia package that is dependent on other Julia packages? What do you need to do with a package to ensure it can be easily referenced and depended on by other packages?
The full error message is below:
ERROR: Unsatisfiable requirements detected for package SchumakerSpline [65e68595]:
SchumakerSpline [65e68595] log:
├─possible versions are: 0.0.1 or uninstalled
├─restricted to versions 0.0.1-* by UnivariateFunctions [117ba14f], leaving only versions 0.0.1
│ └─UnivariateFunctions [117ba14f] log:
│ ├─possible versions are: 0.0.0 or uninstalled
│ └─UnivariateFunctions [117ba14f] is fixed to version 0.0.0
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
This:
restricted by julia compatibility requirements
means that the package (SchumakerSpline) does not support the Julia version you are running.
It seem that the developer of SchumakerSpline did not jet make a new release for Julia 1.0. You might want to make an issue on their repo. Beside this you can also use Pkg.clone on Travis CI to have the latest version of SchumakerSpline (which seems to support 1.0).

NuGet can't update packages

Could not install package 'Microsoft.AspNetCore.Http.Abstractions
2.0.0'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.7', 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.
There are 3 packages I cannot update because of this error:
Microsoft.AspNetCore.Http.Abstractions (Attempting to go from 1.1.2 to 2.0.0)
Microsoft.AspNetCore.Http.Features (Attempting to go from 1.1.2 to 2.0.0)
Microsoft.Extensions.Primiatives (Attempting to go from 1.1.1 to 2.0.0)
Can I simply not use these packages if I'm on .net 4.7?

azure continuous deployment fail

ll of the sudden, Azure continuous deployment constantly fails. Can't get the reason. Here is deployment log, where fail happens.
Command: "D:\home\site\deployments\tools\deploy.cmd"
Handling ASP.NET Core Web Application deployment.
Restoring packages for D:\home\site\repository\project.json...
CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.platforms/index.json
WARNING: Detected package downgrade: System.Xml.XmlSerializer from 4.0.10-beta-23109 to 4.0.0-beta-23109
repository (>= 1.0.0) -> WindowsAzure.Storage (>= 6.2.2-preview) -> System.Runtime.Serialization.Xml (>= 4.0.10-beta-23109) -> System.Private.DataContractSerialization (>= 4.0.0-beta-23109) -> System.Xml.XmlSerializer (>= 4.0.10-beta-23109)
repository (>= 1.0.0) -> WindowsAzure.Storage (>= 6.2.2-preview) -> System.Xml.XmlSerializer (>= 4.0.0-beta-23109)
Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 supports:
- net45 (.NETFramework,Version=v4.5)
- portable-net45+win8 (.NETPortable,Version=v0.0,Profile=Profile7)
Package Microsoft.Data.OData 5.6.4 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.Data.OData 5.6.4 supports:
- net40 (.NETFramework,Version=v4.0)
- portable-net40+sl5+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile328)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
- sl4 (Silverlight,Version=v4.0)
Package Microsoft.Data.Services.Client 5.6.4 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package Microsoft.Data.Services.Client 5.6.4 supports:
- net40 (.NETFramework,Version=v4.0)
- portable-net45+win8+wp8+wpa81 (.NETPortable,Version=v0.0,Profile=Profile259)
- sl4 (Silverlight,Version=v4.0)
Package System.Spatial 5.6.4 is not compatible with dnxcore50 (DNXCore,Version=v5.0). Package System.Spatial 5.6.4 supports:
Tried it with the newest version of the code, with previously successfully deployed versions, with new app, with new app and different app.
If I had to guess, I'd say they're using the new NuGet, which probably means you need to update your project.json file to add imports statements to add compatibility between PCLs and DNX.
To workaround this issue, you can specify a specific version of the System.Xml.XmlSerializer package that works with your project.
Here is a description of how to solve it specific to RC2. Not sure which version would be for RC1.
https://github.com/aspnet/Home/issues/1469#issuecomment-220251320

Resources