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

'--locked-mode / RestoreLockedMode' causes spurious Restore failures when ProjectReferences are involved #7646

Closed
bergbria opened this issue Dec 18, 2018 · 2 comments · Fixed by NuGet/NuGet.Client#2668

Comments

@bergbria
Copy link

Details about Problem

dotnet.exe --version (if appropriate): 2.2.100

Detailed repro steps

  1. Create 2 .csproj files targeting netstandard2.0 using the vanilla VS templates (say dll.csproj and exe.csproj)

  2. Add a project reference from one project to the other (say exe.csproj references dll.csproj)

  3. cd next to the referencing project (exe.csproj)

  4. dotnet restore --use-lock-file

    • This succeeds and correctly generates a lock file
  5. dotnet restore --use-lock-file --locked-mode

    • This fails even though we haven't changed anything since the lock file was originally generated

Sample Project

Sample project here: badLockedModeRepro.zip

You can reproduce the issue by unzipping it and running [root]\repro.bat.

@bergbria bergbria changed the title '--locked-mode / RestoreLockedMode' consistently causes spurious Restore failures when ProjectReferences are involved '--locked-mode / RestoreLockedMode' causes spurious Restore failures when ProjectReferences are involved Dec 18, 2018
@rrelyea rrelyea added this to the 4.9.3 milestone Jan 9, 2019
@jainaashish
Copy link
Contributor

Merged to release-4.9.3-rtm branch with 24559a4553880661efdae2e6ec89c877b3a281ef

@Lizzy-Gallagher
Copy link

Lizzy-Gallagher commented Mar 13, 2019

@jainaashish @rrelyea I am still seeing this error but only when the project reference is a Console project. I was able to reproduce today with NuGet 4.9.4.5839. Happy to open another issue with a similar repro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants