You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Bug Bash] The second project doesn't generate “packages.lock.json” file after restoring project with command under solution path with enabling ‘RestorePackagesWithLockFile’
#13970
Open
CiciLi1 opened this issue
Nov 29, 2024
· 0 comments
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
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.
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
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: