NullReferenceException in PackagesLockFileUtilities.HasDirectPackageDependencyChanged (NuGet.ProjectModel) #14164
Labels
Area:RestoreCPM
Central package management
Area:RestoreRepeatableBuild
The lock file features
Functionality:Restore
Type:Bug
WaitingForClientTeam
Customer replied, needs attention from client team. Do not apply this label manually.
NuGet Product Used
Package restore as part of build in Visual Studio.
Product Version
Visual Studio 2022 Version 17.13.2
Repro Steps & Context
Used the .Net Upgrade Assistant to convert my solution to centralised package management.
Now I get this error in the Output when building:
The only errors are
(There are no versions on
<PackageReference>
s)I debugged the relevant msbuild and found the exception was coming from:
https://github.com/NuGet/NuGet.Client/blob/4fd7b8a94c44e72ba3ad9918e36bcb75d2de4f51/src/NuGet.Core/NuGet.ProjectModel/ProjectLockFile/PackagesLockFileUtilities.cs#L413C119-L413C195
It seems like
e.LibraryRange
must be null somehow.The packages.lock.json for the project is empty:
See stack trace:
Verbose Logs
The text was updated successfully, but these errors were encountered: