I am trying to set up automated builds in TFS2015. The goal is to have solutions automatically build and tested when checked in and if everything passes then a new Nuget package is created and placed in a local repository.
This process works fine for my first solution which is a simple project with no dependencies. The Nuget package that is created from this project is then used by a second project as a dependency.
This works fine when building in Visual Studio. The package is downloaded and extracted as normal. However when I check this second project in to TFS the automated build does not handle this package properly. The package is restored from the local repository but it is not extracted. This means that the build fails as it cannot find the actual DLL that it requires.
I am also using EntityFramework in the project and it works correctly. The package is downloaded but then it is also extracted.
I have tried the workaround given in this question but the TFS server does not have a C:\Users.nuget\packages folder.
I've also tried to clear the Nuget cache using the command here but again that didn't help.
If I manually extract the Nuget package that gets downloaded by the automated build and then run the build again it works which suggests that the issue isn't with the package itself?
Nuget.exe version is 3.5. .Net version is 4.5 standard. Packages are referenced in packages.config and also by project reference. Nuget.exe is being used for the restore.
Any idea on why the local package is not being extracted?