UpdatePackage Exception ((https://nuget.pkg.github.com)
SchreinerK opened this issue · comments
NuGet Product Used
Visual Studio Package Manager Console
Product Version
dornet 8.0.200 nuget 6.10.0.0
Worked before?
No response
Impact
I'm unable to use this version
Repro Steps & Context
Trying update a prerelease package from github (https://nuget.pkg.github.com) for the first time.
Update from nuget (api.nuget.org) does work.
First using visual stufio UI, then package manager console. both logs appended
Verbose Logs
Restoring packages for D:\Develop\Extern\GitHub.xxxxxx\xxxxxxxxxxxxxxxxxx\src\xxxxxxxxxxxxxxxxxx.csproj...
GET https://api.nuget.org/v3/vulnerabilities/index.json
OK https://api.nuget.org/v3/vulnerabilities/index.json 53ms
GET https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/vulnerability.base.json
GET https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/2024.06.29.11.31.04/vulnerability.update.json
OK https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/vulnerability.base.json 50ms
OK https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/2024.06.29.11.31.04/vulnerability.update.json 108ms
System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteBuildIntegratedProjectActionsAsync>d__93.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__87.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__86.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at NuGet.PackageManagement.NuGetPackageManager.<ExecuteNuGetProjectActionsAsync>d__85.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<>c__DisplayClass20_0.<<ExecuteActionsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.PackageManagement.VisualStudio.NuGetProjectManagerService.<CatchAndRethrowExceptionAsync>d__32.MoveNext()
Time Elapsed: 00:00:01.2737315
========== Finished ==========
PM> Update-Package xxxxxx.xxxxxxxxxxxx -Verbose -IncludePrerelease
No package updates are available from the current package source for project 'xxxxxxxxxxxxxxxxxx.Tests'.
GET https://api.nuget.org/v3/registration5-gz-semver2/xxxxxx.xxxxxxxxxxxx/index.json
GET https://nuget.pkg.github.com/xxxxxx/xxxxxx.xxxxxxxxxxxx/index.json
OK https://nuget.pkg.github.com/xxxxxx/xxxxxx.xxxxxxxxxxxx/index.json 407ms
OK https://api.nuget.org/v3/registration5-gz-semver2/xxxxxx.xxxxxxxxxxxx/index.json 524ms
Running restore with 24 concurrent jobs.
Reading project file D:\Develop\Extern\xxxxxxxx\xxxxxxxxxxxxxxxxxx\src\xxxxxxxxxxxxxxxxxx.csproj.
Restoring packages for D:\Develop\Extern\xxxxxxxx\xxxxxxxxxxxxxxxxxx\src\xxxxxxxxxxxxxxxxxx.csproj...
Restoring packages for .NETCoreApp,Version=v8.0...
Resolving conflicts for net8.0-windows7.0...
CACHE https://api.nuget.org/v3/vulnerabilities/index.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/vulnerability.base.json
CACHE https://api.nuget.org/v3-vulnerabilities/2024.06.28.05.31.02/2024.06.29.11.31.04/vulnerability.update.json
All packages and projects are compatible with net8.0-windows7.0.
Update-Package : Object reference not set to an instance of an object.
At line:1 char:1
+ Update-Package xxxxxx.xxxxxxxxxxxx -Verbose -IncludePrerelease
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Update-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
Time Elapsed: 00:00:02.0589993
NuGetPackageManager.ExecuteBuildIntegratedProjectActionsAsync method is too long to identify the root cause of the failure.
@SchreinerK I am interested in learning more about whether the project has multiple target frameworks, any conditional package references, etc. Would it be possible to provide us with a sample project to reproduce the issue?
This issue has been automatically marked as stale because we have not received a response in 14 days. It will be closed if no further activity occurs within another 14 days of this comment.