Nuget 奇怪的NU1605引用NETStandard.Library 1.6.0,而转移点的库实际上引用NETStandard 2.0版

Nuget 奇怪的NU1605引用NETStandard.Library 1.6.0,而转移点的库实际上引用NETStandard 2.0版,nuget,.net-5,.net-standard-2.0,Nuget,.net 5,.net Standard 2.0,NET 5项目在我的工作站上正确构建,但在构建服务器上它崩溃了。此问题在将.NET Core 3.1升级到.NET 5时立即出现,这与在生成服务器上安装.NET 5是一致的 生成服务器中的错误: Centoscript.Forms\Cedaron.Centoscript.Forms.csproj : error NU1605: Detected package downgrade: System.IO.FileSystem.Primitives from 4.3.0 to 4.0.1. Refe

NET 5项目在我的工作站上正确构建,但在构建服务器上它崩溃了。此问题在将.NET Core 3.1升级到.NET 5时立即出现,这与在生成服务器上安装.NET 5是一致的

生成服务器中的错误:

Centoscript.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Diagnostics.Debug (>= 4.0.11)
Centoscript.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.Diagnostics.Debug (>= 4.0.11)
Centoscript.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.Centoscript.Forms.csproj : error NU1605:  Centoscript.Forms -> CentoScript 5.2.0.3 -> NETStandard.Library 1.6.0 -> System.IO.FileSystem (>= 4.0.1)
Centoscript.Forms\Cedaron.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.Forms\Cedaron.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.Forms\Cedaron.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.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>

net5.0
9
假的
Centoscript的项目文件(在正常工作和中断之间保持不变——它的目标是netstandard2.0,以便在核心和框架之间交叉使用):


netstandard2.0
百分百
百分百
5.2.0.4
7.3
我怀疑我们通过
Common
得到了不好的引用,除了
CentoScript.Forms
使用了更高版本的
Common
来践踏引用之外。无论如何,这是一种糟糕的解释,因为它一直在工作,直到
CentoScript.Forms
的构建目标从
netcoreapp3.1
更改为
net5.0

我不必添加对列出的包的引用,而且我绝对不应该在任何请求的版本中添加它们。net5.0应该自动获取更高版本的软件


是的,我真的想放两个不同的.NET版本标签。显然有多个版本在起作用。

Oops问题是生成服务器上的nuget缓存已损坏

<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>