You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dotnet --info
.NET Command Line Tools (2.0.3)
Product Information:
Version: 2.0.3
Commit SHA-1 hash: 12f0c7efcc
Runtime Environment:
OS Name: Windows
OS Version: 10.0.16299
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\2.0.3\
Microsoft .NET Core Shared Framework Host
Version : 2.0.3
Build : a9190d4a75f4a982ae4b4fa8d1a24526566c69df
Project references both NodaTime (NS 1.x) and Dapper (NS 2.0).
When built WITHOUT <RuntimeIdentifiers> in the .csproj dotnet restore runs to completion and restore is successfull.
When <RuntimeIdentifiers> is set to any valid value AND both packages are referenced/used restore fails with these cryptic messages:
$ dotnet restore
Restoring packages for C:\projects\repro-netstandard\repro-netstandard.csproj...
C:\projects\repro-netstandard\repro-netstandard.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.
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.IO.FileSystem.Primitives (>= 4.3.0)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem.Primitives (>= 4.0.1)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: Detected package downgrade: System.Resources.ResourceManager from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Resources.ResourceManager (>= 4.3.0)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.Resources.ResourceManager (>= 4.0.1)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: Detected package downgrade: System.Runtime.Handles from 4.3.0 to 4.0.1. Reference the package directly from the project to select a different version.
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.Handles (>= 4.3.0)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> System.Runtime.Handles (>= 4.0.1)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: Detected package downgrade: System.Runtime.InteropServices from 4.3.0 to 4.1.0. Reference the package directly from the project to select a different version.
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Runtime.InteropServices (>= 4.3.0)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.Runtime.InteropServices (>= 4.1.0)
C:\projects\repro-netstandard\repro-netstandard.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.
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.IO.FileSystem 4.0.1 -> runtime.win.System.IO.FileSystem 4.3.0 -> System.Text.Encoding.Extensions (>= 4.3.0)
C:\projects\repro-netstandard\repro-netstandard.csproj : error NU1605: repro-netstandard -> NodaTime 2.2.3 -> System.Runtime.Serialization.Xml 4.1.1 -> System.Xml.ReaderWriter 4.0.11 -> System.Text.Encoding.Extensions (>= 4.0.11)
Generating MSBuild file C:\projects\repro-netstandard\obj\repro-netstandard.csproj.nuget.g.props.
Restore failed in 378 ms for C:\projects\repro-netstandard\repro-netstandard.csproj.
Note that if Dapper / NodaTime are used exclusively dotnet restore while using <RuntimeIdentifiers> runs successfully again....
It looks like NuGet is correctly identifying the downgrades due to how these packages are authored, and the SDK is setting NU1605 to an error.
Getting different packages is expected when using a RID. If the packages brought in by the RID cause problems then it is also a package authoring issue.
From @ogreenz on December 4, 2017 14:4
Repro repo:
https://github.com/ogreenz/rid-netstandard2-repro
dotnet --info
:Project references both NodaTime (NS 1.x) and Dapper (NS 2.0).
When built WITHOUT
<RuntimeIdentifiers>
in the .csprojdotnet restore
runs to completion and restore is successfull.When
<RuntimeIdentifiers>
is set to any valid value AND both packages are referenced/used restore fails with these cryptic messages:Note that if Dapper / NodaTime are used exclusively dotnet restore while using
<RuntimeIdentifiers>
runs successfully again....Copied from original issue: dotnet/sdk#1792
The text was updated successfully, but these errors were encountered: