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
Related
Assuming I'm already using the NuGet Package
Microsoft.AspNetCore.Components 5.0.3
Can I upgrade it to 5.0.5 without having the 5.0.5 runtime installed (dotnet --list-runtimes)?
If I look at the dependencies in Nuget it just states:
net5.0 (no specific sdk, nor runtime)
-> Microsoft.AspNetCore.Components.Analyzers (>= 5.0.5)
-> Microsoft.AspNetCore.Authorization (>= 5.0.5)
Is there a specific reason to upgrade to 5.0.5 from 5.0.3? If its because you need something specific added in 5.0.5, then, while it might work, chances are it wont, as Andy says
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)
.NET Core 2.2.0
TeamCity Professional 2019.1.2 (build 66342)
build step .NET CLI dotnet restore
error NU1605: Detected package downgrade: System.Runtime from 4.3.1 to 4.3.0. Reference the package directly from the project to select a different version.
error NU1605: MyTestProject -> MyProject -> Microsoft.AspNet.WebApi.Client 5.2.6 -> Newtonsoft.Json 10.0.1 -> System.Runtime.Extensions 4.3.1 -> System.Runtime (>= 4.3.1)
error NU1605: MyTestProject -> MyProject -> Microsoft.AspNet.WebApi.Client 5.2.6 -> Newtonsoft.Json 10.0.1 -> System.Runtime (>= 4.3.0)
Local Visual Studio build runs clean with no such restore errors.
But TeamCity build throws many errors this type.
I have two questions :
How to reliably resolve this error ?
Please note that adding package references to .csproj is not a good option because my build has a lot of errors of this type. Potentially it would be required to add an explicit PackageReference to every leaf package in the dependencies tree.
Why does MSBUILD consider this to be an error and not a warning ?
To my eye the version constraints are compatible because 4.3.1 satisfies both constraints System.Runtime (>= 4.3.1) and System.Runtime (>= 4.3.0).
Isn't that what the author of Newtonsoft.Json 10.0.1 intended ?
A similar type of error is happening in four distinct builds ( in four distinct apps ) :
[restore] MyApp.csproj: error NU1605: Detected package downgrade: Microsoft.EntityFrameworkCore.Relational from 2.2.1 to 2.2.0. Reference the package directly from the project to select a different version.
MyApp.csproj: error NU1605: MyApp -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore.Design 2.2.1 -> Microsoft.EntityFrameworkCore.Relational (>= 2.2.1)
MyApp.csproj: error NU1605: MyApp -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore.Relational (>= 2.2.0 && < 2.3.0)
MyApp.csproj: error NU1605: Detected package downgrade: Microsoft.EntityFrameworkCore from 2.2.1 to 2.2.0. Reference the package directly from the project to select a different version.
MyApp.csproj: error NU1605: MyApp -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore.InMemory 2.2.1 -> Microsoft.EntityFrameworkCore (>= 2.2.1)
MyApp.csproj: error NU1605: MyApp -> Microsoft.AspNetCore.App 2.2.0 -> Microsoft.EntityFrameworkCore (>= 2.2.0 && < 2.3.0)
Because I began seeing these errors in all four builds around the same time, and because there are no code commits which plausibly could have caused the errors ( and definitely not across all four apps ), it leads me to believe that something was changed on the Build Agent ( which is shared with others ).
Or what could cause many app restores to simultaneously begin failing with these errors ?
When using log4net from Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 running
dotnet publish -c release -r win81-x64
causes these errors:
:: error NU1605: Detected package downgrade: System.Net.NameResolution from 4.3.0 to 4.0.0. Reference the package directly from the project to select a different version.
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0)
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.NameResolution (>= 4.0.0)
:: error NU1605: Detected package downgrade: System.Net.Primitives from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Net.Primitives (>= 4.3.0)
:: error NU1605: DailyPieChartUpdate -> Microsoft.Extensions.Logging.Log4Net.AspNetCore 2.2.4 -> log4net 2.0.8 -> System.Net.Sockets 4.1.0 -> System.Net.Primitives (>= 4.0.11)
Restore failed in 588.96 ms
Any advice?
Step 1 is to go into your project files and make sure you have references to only one version of log4net,
Step 2 is to clean your local nuget packages
Step 3 is to get all the nuget packages again
hopefully, that solves your problem
it is a good idea to reference the latest log4net version for .net core.
Maybe I'm answering too much time later, but...
The problem I thought is caused because some of your already imported libraries on your project are downgrades of the imported libraries that Microsoft.Extensions.Logging.Log4Net.AspNetCore nuget are referencing.
There are other users that have problems with the same issue. You can check this github issue to find out what is the solution.
Sorry by the inconveniences.
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?