Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore FAILS with <RuntimeIdentifiers> set and <PackageReference> to BOTH NS 1.x + 2.0 #1792

Closed
ogreenz opened this issue Dec 4, 2017 · 1 comment

Comments

@ogreenz
Copy link

ogreenz commented Dec 4, 2017

Repro repo:
https://github.com/ogreenz/rid-netstandard2-repro

dotnet --info:

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

@livarcocc
Copy link
Contributor

This issue was moved to NuGet/Home#6457

JL03-Yue pushed a commit that referenced this issue Mar 19, 2024
…102.2 (#1792)

[main] Update dependencies from dotnet/arcade
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants