AppHarbor Tips

Some tips I have discovered on using AppHarbor as a PaaS.

Tracking Branches

AppHarbor has a great new feature called Tracking Branch (find it under the Settings for your application) that allows you to specify a specific branch for them to track.

This is super useful because otherwise, AppHarbor will be building and tracking every branch in your repo and since the build status only includes 10 entries, failed builds can add up really quick. This means that if you need to rollback a build, you cannot if you have lots of broken builds. In the past, I would have to create multiple repositories and only have AppHarbor watch my “production” repo, now I can specify a “production” branch, merge changes into the production branch and push it to origin.

BUT … some providers like BitBucket do not publish notifications if there are no commits and if a merge can be fast forwarded there are no commits. So when merging in to your tracking branch use the --no-ff flag.

Your workflow then may look something like this:

git commit
git push origin master
git checkout production
git merge master --no-ff
git push origin production

AppHarbour should then pick up the changes and start the build.

Here is a link to an AppHarbor support discussion about this.

NuGet Error: The process cannot access the file

I was constantly getting this problem and it would take four or five “pokes” to get a successful build.

Turns out the problem is that AppHarbor runs builds in parallel and if you have projects that depend on the same package, one build may be using that package and therefor the other builds may not be able to access it.

I am using NuGet 2.6 and I have heard that this problem may be resolved in the next release.

To solve the problem in the meantime, you can disable caching of the packages. This is done adding a –nocache flag to the RestoreCommand of the NuGet.targets file.

Open your NuGet.targets file and you should find a RestoreCommand element. Add the –nocache flag to the end of the element as such:

  <RestoreCommand>$(NuGetCommand) install "$(PackagesConfig)" -source "$(PackageSources)"  $(NonInteractiveSwitch) $(RequireConsentSwitch) -solutionDir "$(SolutionDir) " -nocache </RestoreCommand>

Link to AppHarbor discussion:


TrackBack URL for this entry:

Listed below are links to weblogs that reference AppHarbor Tips:


You can follow this conversation by subscribing to the comment feed for this post.

The comments to this entry are closed.