Skip to content

LockFile validation fails for projects with <RuntimeIdentifiers> set in SDK 3.0.100 #8639

@bergbria

Description

@bergbria

Details about Problem

NuGet product used: dotnet.exe

dotnet.exe --version: 3.0.100

Worked before?: Yes, with sdk version 2.2.402

Automated Repro

  1. Download netSdk3_rid_lockFile_repro.zip
  2. Extract
  3. Run repro.bat

Manual repro steps

  1. Create a .csproj resembling this:
<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>netcoreapp2.1</TargetFramework> <RuntimeIdentifiers>win-x64;osx-x64</RuntimeIdentifiers> </PropertyGroup> </Project>
  1. dotnet restore --use-lock-file
    • This will succeed and write a lock file
  2. dotnet restore --use-lock-file --locked-mode
    • This will fail with error NU1004: The packages lock file is inconsistent with the project dependencies despite the fact that the file was just generated and nothing has changed.

Tagging @nkolev92 and @rrelyea as FYI.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions