Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error “Package System.ArgumentNullException: Value cannot be null” occurs when restoring package with the context menu: ‘Restore NuGet Packages’ after cleaning solution #13452

Closed
CiciLi1 opened this issue May 20, 2024 · 2 comments · Fixed by NuGet/NuGet.Client#5813
Assignees
Labels
Found:ManualTests Functionality:Restore Priority:1 High priority issues that must be resolved in the current sprint. RegressionDuringThisVersion A regression which broke since last RTM, and was fixed before the next RTM. Type:Bug
Milestone

Comments

@CiciLi1
Copy link

CiciLi1 commented May 20, 2024

NuGet Product Used

Visual Studio Package Management UI

Product Version

NuGet Client Dev\6.11.0.55

Worked before?

It’s a regression since it doesn’t repro on Main\34915.142 + NuGet Client Dev\6.11.0.50.

Impact

It's more difficult to complete my work

Repro Steps & Context

Repro Steps:   

  1. Create a C# Console App (.NET Core) project in VS.

  2. Right-click the solution node in Solution Explorer window and click the context menu: ‘Clean Solution’.

  3. Right-click the solution node in Solution Explorer window and click the context menu: ‘Restore NuGet Packages’.

Expected:   

The retore is successful without any error.

Actual:

An error “Package System.ArgumentNullException: Value cannot be null” occurs as below:
image (1)

Notes:    

  1. The repro rate is 100%.    

  2. It doesn’t repro on non-SDK project that install package with “packages.config” format.

  3. It doesn’t repro after running ‘dotnet restore’ or ‘msbuild /t:restore’ command in CLI and ‘nuget restore’ in PMC.

Verbose Logs

No response

@nkolev92 nkolev92 self-assigned this May 20, 2024
@nkolev92 nkolev92 added Priority:1 High priority issues that must be resolved in the current sprint. RegressionFromPreviousRTM A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3 RegressionDuringThisVersion A regression which broke since last RTM, and was fixed before the next RTM. and removed Triage:Untriaged RegressionFromPreviousRTM A regression from the last RTM. Example: worked in 6.2, doesn't work in 6.3 labels May 20, 2024
@nkolev92
Copy link
Member

Team Triage: If we don't fix this by EOD, we should revert the change.

@jebriede, please hold the insertion until this is fixed or reverted.

@nkolev92
Copy link
Member

Same fix applies to both #13451 and this.

I have the change ready, it was a simple fix. I'm just gonna add some more tests before PRing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Found:ManualTests Functionality:Restore Priority:1 High priority issues that must be resolved in the current sprint. RegressionDuringThisVersion A regression which broke since last RTM, and was fixed before the next RTM. Type:Bug
Projects
None yet
3 participants