dotnet build should print out a more helpful message when no lock file is present
See original GitHub issueSteps 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:
- Created 7 years ago
- Reactions:1
- Comments:14 (8 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Which is why I moved to preview4.
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.