Bizarre NU1605 referecing NETStandard.Library 1.6.0 when the library of the diversion point is actually referencing netstandard version 2.0

Asked By: Anonymous

The .NET 5 project builds correctly on my workstation, but on the build server it blows up. This problem appeared immediately on upgrading .NET Core 3.1 to .NET 5 which coincided with installing .NET 5 on the build server.

Errors from the build server:

Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Console 4.0.0 -> runtime.win.System.Console 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem.Primitives (>= 4.0.1)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.Text.Encoding.Extensions from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Diagnostics.Debug (>= 4.0.11)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem.Primitives (>= 4.0.1)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.Text.Encoding.Extensions from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Text.Encoding.Extensions (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Text.Encoding.Extensions (>= 4.0.11)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.Diagnostics.Debug from 4.3.0 to 4.0.11. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.Diagnostics.Debug (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Diagnostics.Debug (>= 4.0.11)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.IO.FileSystem (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem (>= 4.0.1)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Net.Sockets 4.1.0 -> runtime.win.System.Net.Sockets 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)
Centoscript.FormsCedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem.Primitives (>= 4.0.1)

Project file for Centoscript.Forms:

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFramework>net5.0</TargetFramework>
    <LangVersion>9.0</LangVersion>
    <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="../AssemblyInfo.cs" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="Common" Version="2.2.0" />
    <PackageReference Include="CentoScript" Version="5.2.0.3" />
  </ItemGroup>
</Project>

Project file for Centoscript (unchanged between working and broken–it targets netstandard2.0 for cross-use between core and framework):

<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>netstandard2.0</TargetFrameworks>
    <AssemblyName>CentoScript</AssemblyName>
    <PackageId>CentoScript</PackageId>
    <Version>5.2.0.4</Version>
    <LangVersion>7.3</LangVersion>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Common" Version="1.0.2" />
  </ItemGroup>

  <ItemGroup>
    <PackageReference Include="System.Dynamic.Runtime" Version="4.0.11" />
    <PackageReference Include="System.Net.Primitives" Version="4.3.0" />
    <PackageReference Include="Microsoft.CSharp" Version="4.0.1" />
    <PackageReference Include="System.ValueTuple" Version="4.3.0" />
  </ItemGroup>
</Project>

I would suspect we got bad references via Common except for the fact that CentoScript.Forms uses a much higher version of Common that should stomp the references. In any case that is a kind of bad explanation because it was working until the build target of CentoScript.Forms was changed from netcoreapp3.1 to net5.0.

I should not have to add references to the listed packages, and I definitely should not add them at either requested version. net5.0 should be picking up much higher versions of them automatically.

Yes I really did mean to put two different .NET version tags. Multiple versions are clearly in play.


Solution

Answered By: Anonymous

Oops the problem was a corrupted nuget cache on the build server.

techinplanet staff

techinplanet staff


Windows 10 Kaufen Windows 10 Pro Office 2019 Kaufen Office 365 Lizenz Windows 10 Home Lizenz Office 2019 Home Business Kaufen windows office 365 satın al follower kaufen instagram follower kaufen porno