Skip to content

NuGet.exe 3.4.4 fails to restore due to allegedly missing runtime assemblies #2915

Closed
@AArnott

Description

When trying to upgrade from nuget.exe 3.3.0 to 3.4.4, I observed that package restore failed.

Firstly, due to nuget crawling more projects more aggressively, which I was able to workaround.

Secondly, because for a bunch of CoreFx packages "there is no run-time assembly compatible with win":

    System.AppContext 4.0.0 provides a compile-time reference assembly for System.AppContext on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.
    System.IO.Pipes 4.0.0-beta-23409 provides a compile-time reference assembly for System.IO.Pipes on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.
    System.Net.Sockets 4.1.0-beta-23409 provides a compile-time reference assembly for System.Net.Sockets on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.
    System.Diagnostics.Process 4.0.0-beta-23409 provides a compile-time reference assembly for System.Diagnostics.Process on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.
    System.Runtime.InteropServices.RuntimeInformation 4.0.0-beta-23409 provides a compile-time reference assembly for System.Runtime.InteropServices.RuntimeInformation on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.
    System.Security.Cryptography.Algorithms 4.0.0-beta-23409 provides a compile-time reference assembly for System.Security.Cryptography.Algorithms on .NETFramework,Version=v4.5.1, but there is no run-time assembly compatible with win.

I don't know how to workaround this. This appears to be a regression in nuget.exe 3.4.4 as some of these are 'stable' corefx packages and I wouldn't expect nuget.exe to break them.

I tried changing all my project.json's mentions of runtimes: { "win": { } } to mention win-x86 and win-x64 instead but that didn't help.

Repro steps:

git clone https://devdiv.visualstudio.com/DefaultCollection/DevDiv/_git/DevCore
cd DevCore\src\coreclr
git checkout dev/andarno/accomodateNuGet344
nuget restore

Metadata

Assignees

No one assigned

    Labels

    Resolution:DuplicateThis issue appears to be a Duplicate of another issue

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions