JDetmar / NLog.Extensions.AzureStorage

NLog Target for Azure Storage. Uses NLog batch write to optimize writes to Storage.
MIT License
31 stars 19 forks source link

Error NU1605: Detected package downgrade #109

Closed m4ss1m0g closed 3 years ago

m4ss1m0g commented 3 years ago

Description

When compiling for RID linux-x64 or alpine-x64 the compiler issue the error on title

Step to reproduce

  1. Create a new project and reference the package <PackageReference Include="NLog.Extensions.AzureCosmosTable" Version="2.7.1"/>
  2. dotnet restore -r linux-x64 project.csproj

Error

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. C:\project.csproj : error NU1605: Project -> NLog.Extensions.AzureCosmosTable 2.7.1 -> Microsoft.Azure.Cosmos.Table 1.0.8 -> Microsoft.Azure.DocumentDB.Core 2.11.2 -> System.Net.NetworkInformation 4.1.0 -> System.Net.Sockets 4.1.0 -> runtime.unix.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0) Project.csproj : error NU1605: Project -> NLog.Extensions.AzureCosmosTable 2.7.1 -> Microsoft.Azure.Cosmos.Table 1.0.8 -> Microsoft.Azure.DocumentDB.Core 2.11.2 -> System.Net.NameResolution (>= 4.0.0) Project.csproj : 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. Project.csproj : error NU1605: Project -> NLog.Extensions.AzureCosmosTable 2.7.1 -> Microsoft.Azure.Cosmos.Table 1.0.8 -> Microsoft.Azure.DocumentDB.Core 2.11.2 -> NETStandard.Library 1.6.0 -> System.Net.Sockets 4.1.0 -> runtime.unix.System.Net.Sockets 4.3.0 -> System.Net.NameResolution (>= 4.3.0) Project.csproj : error NU1605: Project -> NLog.Extensions.AzureCosmosTable 2.7.1 -> Microsoft.Azure.Cosmos.Table 1.0.8 -> Microsoft.Azure.DocumentDB.Core 2.11.2 -> System.Net.NameResolution (>= 4.0.0)

snakefoot commented 3 years ago

Looks like a problem with Microsofts own package Microsoft.Azure.DocumentDB.Core. Not something that can be fixed by this project. Guess you have to contact Microsoft about this.

Notice that you should change to NLog.Extensions.AzureDataTables , because NLog.Extensions.AzureCosmosTable is now legacy.

m4ss1m0g commented 3 years ago

I think Microsoft drop the support for the netstandard2.0 on the library used on project. If you change the TargetFrameworks on csproj from netstandard2.0 to netstandard2.1 and the pre-processor directive on the code from NETSTANDARD2_0 to NETSTANDARD_2.1 the project build and restore using the rid linux-x64

Notice that you should change to NLog.Extensions.AzureDataTables , because NLog.Extensions.AzureCosmosTable is now legacy.

Ok thanks

snakefoot commented 3 years ago

Think it is the other way around. Microsoft abandoned the project and never moved to NetStandard2 or NetStandard21 (stuck at NetStandard1)

Again the advice is moving to AzureDataTables instead.