question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet build should print out a more helpful message when no lock file is present

See original GitHub issue

Steps to reproduce

git clone https://github.com/dotnet/cli cd cli\test\dotnet.Tests dotnet restore && dotnet test

Expected behavior

Failing run of tests with the message that the referenced P2P dependency was not restored.

Actual behavior

…\cli\test\dotnet.Tests>dotnet restore && dotnet test Project Microsoft.DotNet.InternalAbstractions does not have a lock file. Project Microsoft.DotNet.InternalAbstractions does not have a lock file.

Environment data

dotnet --info output:

.NET Command Line Tools (1.0.0-beta-002192)

Product Information:
 Version:     1.0.0-beta-002192
 Commit Sha:  47530fce56

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.10586
 OS Platform: Windows
 RID:         win10-x64

Issues

  • Really bad error messages - this is too cryptic what needs to happen to fix it (cc: @blackdwarf)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:14 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
livarcocccommented, Nov 11, 2016

Which is why I moved to preview4.

0reactions
blackdwarfcommented, Nov 15, 2016

Just to add to this, the behavior on a Windows machine is even weirder since it will not fail, but will produce something unexepcted. On Windows, I guess that .NET 4.0 ref assemblies exist or MSBuild ends up using the GAC, so without a restore you will not see an error and an assembly will get produced, but it will not be what the user expects.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
Please run "dotnet restore" to generate a new lock file ...
If you have project references you need to restore all projects. The easiest way to do it is to go to the solution/repo...
Read more >
dotnet pack command - .NET CLI
The dotnet pack command creates NuGet packages for your .NET project. ... The build can also fail if there is a locked file...
Read more >
Dotnet restore clean. cs files) Removing information from ...
csproj I get the following: Nothing to do. NuGet restore will … Clean the Solution=>msbuild xxx. Learn more about Teams Looks like this...
Read more >
Untitled
You can restore your NuGet to work, however it would be nice if there was a way to run dotnet restore on every...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found