Jenkins CI is skipping packages on nuget.exe restore my.sln
<p>After kicking of the Jenkins (v2.8) build, the Workspace is cleared, Git sources are pulled and a "nuget.exe restore my.sln" (v3.4.4) is issued using the "Execute Windows Batch Command" build task. Checking Jenkins console output indicates restore action:</p>

<pre><code>NuGet Config files used:
C:\Windows\system32\config\systemprofile\AppData\Roaming\NuGet\NuGet.Config

Feeds used:
C:\Windows\system32\config\systemprofile\AppData\Local\NuGet\Cache
C:\Windows\system32\config\systemprofile\.nuget\packages\
https://api.nuget.org/v3/index.json

Installed:
3 package(s) to packages.config projects
</code></pre>

<p>So far all looks good, but upon investigation some packages were skipped as my package.config actually contains <strong>5 packages</strong>:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;packages&gt;
   &lt;package id="Dapper" version="1.42" targetFramework="net452" /&gt;
   &lt;package id="FluentMigrator" version="1.6.1" targetFramework="net452" /&gt;
   &lt;package id="FluentMigrator.Runner" version="1.6.1" targetFramework="net452" /&gt;
    &lt;package id="FluentValidation" version="6.1.0.0" targetFramework="net452" /&gt;
    &lt;package id="Newtonsoft.Json" version="8.0.2" targetFramework="net452" /&gt;
&lt;/packages&gt;  
</code></pre>

<p>Both Dapper and FluentValidation packages were skipped. My first thought, I probably made a silly error in my package configuration, or I'm accidentally referencing the wrong package.config... However, executing the exact same nuget restore command on the build server reveals:</p>

<pre><code>NuGet Config files used:
C:\Users\admin\AppData\Roaming\NuGet\NuGet.Config

Feeds used:
C:\Users\admin\AppData\Local\NuGet\Cache
C:\Users\admin\.nuget\packages\
https://api.nuget.org/v3/index.json

Installed:
5 package(s) to packages.config projects 
</code></pre>

<p>I'm at a loss as to why the Jenkins build task is skipping, or only partially downloading the required packages. Anybody out there with a similar experience?</p>

<p><strong>UPDATE:</strong></p>

<p>Created a brand new test project and included one of the missing packages, modified the jenkins project to pull this project from git instead. Hit nuget restore mytest.sln and it just works. Still don't understand why other sln doesn't work, but at least determined that this behaviour must be related to the solution, or one of its projects. Not spending any more time on this. Will recreate projects instead. </p>