[Bug Bash] The second project doesn't generate “packages.lock.json” file after restoring project with command under solution path with enabling ‘RestorePackagesWithLockFile’ #13970
Labels
Area:RestoreRepeatableBuild
The lock file features
Found:ManualTests
Style:PackageReference
Type:Bug
WaitingForClientTeam
Customer replied, needs attention from client team. Do not apply this label manually.
NuGet Product Used
Visual Studio Package Management UI
Product Version
NuGet Client Dev\6.13.0.79
Worked before?
It is not a regression since it also reproes on D16.11\34601.136 with implicit NuGet Client 5.11.6.4 and D17.12\33527.113 with implicit NuGet Client 6.12.2.1.
Impact
It bothers me. A fix would be nice
Repro Steps & Context
Notes:
The repro rate is 100%.
This issue does not repro when you save the project in step 5 by clicking the “Save” button on the top of VS.
Repro Steps:
Create two “C# Class Library (.NET Framework 4.8.1)” projects.
Right-click the solution in Solution Explorer window and select "Manage NuGet Packages for Solutions…" menu item to open solution-level PM UI.
Click “Browse” tab and select “nuget.org” from “Package source” drop-down list.
Install a package (e.g.Newtonsoft.Json) with “PackageReference” format into both projects.
Right-click the project in Solution Explorer and select “Unload project”, click the “Save” button in prompt dialog box. (Both projects operate in the same way.)
Set MSBuild property “RestorePackagesWithLockFile” to true in csproj file for every project.
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
Reload projects and click “Tools -> Command Line -> Developer Command Prompt”
Run restore command “msbuild /t:restore /v:d”.
Expected:
It should have generated ‘packages.lock.json’ file alongside *.csproj file in every project.
Actual:
The second project doesn’t generate “packages.lock.json” file as below screenshot:
Verbose Logs
No response
The text was updated successfully, but these errors were encountered: