NuGet 1.6 shipped with a great feature called NuGet Package Restore. This feature lets you use NuGet packages without adding them to your source code repository. When your solution is built by Visual Studio (or MSBuild), a build target calls nuget.exe to make sure any missing packages are automatically fetched and installed before the code is compiled. This lets you keep your repository small by keeping bulky packages out of version control.
To use NuGet Package Restore with AppHarbor, open your favourite AppHarbor hosted app in Visual Studio, right-click the solution icon and select "Enable NuGet Package Restore". Add the "packages" directory to your
.gitignore file and untrack the packages directory if it's already added to your repository:
git rm -r --cached packages
Now you can push to AppHarbor (or GitHub, Bitbucket or CodePlex if that's where your code is hosted) and the packages folder will automatically be re-populated with the NuGet packages your solution requires to successfully build. You can verify that this happens by looking at the build output on AppHarbor. You should see something like this:
-source "" -o "D:\temp\x2iood3j.ltv\input\packages"
Successfully installed 'elmah 188.8.131.52'.
Successfully installed 'elmah.corelibrary 1.2.1'.
Look Ma!, no