Failed to update NuGet packages in PowerServer C# solution

The PowerServer C# solution failed to update the NuGet packages; or the PowerServer C# solution failed to build because the dependent NuGet packages were not updated.

Solution:

1) Make sure the computer can connect to the NuGet site (https://www.nuget.org).

2) Clean and then rebuild the PowerServer C# solution.