Setup to build C# project from the command line with Nuget package restore

For small solutions┬ámy preferred deployment method is via Github, i’m recording the details here for my own benefit.

  1. Create a new git repo and push up your code.
  2. On your test/live server clone the repo
    • git clone
  3. Make sure nuget.exe is available in powershell/cmd line you can use chocolatey
    • ┬áchoco install nuget.commandline
  4. Restore nuget packages (if you’ve referenced any)
    • nuget restore MySolution.sln
  5. Build the solution
    • msbuild Mysolution.sln