My aim is to have package restore working on a build server so that I don't have to check in binaries. At the moment, I'm simply trying to get it to work on my own machine using Visual Studio.
Here's what I've done so far:
- Followed the instructions here http://docs.nuget.org/docs/workflows/using-nuget-without-committing-packages, including both setting the Tools-Options flag and the environment variable (belt and braces)
- Installed the NuGetEnablePackageRestore package as suggested here NuGet package restore consent without NuGet
- Checked everything in (the .nuget solution folder and its contents), but not the binaries I want to reference, because that's the whole point of the exercise
Here's what I'm doing:
- Check out solution
- Verify that nunit.framework.dll and moq.dll are not present in the checked out solution
- Build the solution
Visual Studio complains that Moq is missing. I search for the dlls in the solution directory and find that:
- nunit.framework.dll is present in the appropriate bin folders
- Moq.dll is nowhere to be found
But there's more. This is truly mysterious, but if I do a fresh checkout, disconnect from the internet and build, I get precisely the same results - nunit.framework.dll is there, but moq.dll is not. The build process has conjured nunit.framework.dll literally from nowhere.
So it's something of an understatement to say that I am completely baffled. Can anyone suggest answers to the following questions:
- Why is package restore not downloading Moq?
- Where on earth is the build process getting nunit.framework.dll, if not the internet?