1
votes

I am trying to run "nuget restore" on a server that does not have a Visual Studio installation. But nuget.exe fails immediately. What else needs to be installed for NuGet to run?

C:\Users\kevin>nuget help Could not load file or assembly 'System.Net.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified. Could not load type 'System.Runtime.CompilerServices.IAsyncStateMachine' from assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Could not load file or assembly 'System.Net.Http.WebRequest, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

1
What .NET framework versions does your server have installed?Jeff Fritz

1 Answers

1
votes

Had this issue as well. Newer versions of NuGet requires .NET 4.5. installing .NET 4.5.2 resolved the issue for me.