Octopus and TeamCity: Part I

This page is out of date - please see the updated information in the Octopus Deploy documentation.

A picture of me

Welcome, my name is Paul Stovell. I live in Brisbane and work on Octopus Deploy, an automated deployment tool.

Prior to founding Octopus Deploy, I worked for an investment bank in London building WPF applications, and before that I worked for Readify, an Australian .NET consulting firm. I also worked on a number of open source projects and was an active user group presenter. I was a Microsoft MVP for WPF from 2006 to 2013.

23 Mar 2012

Great article. That was nice to know more about octopus integration. Starting from TeamCity 6.5 we added a NuGet runners support for TeamCity. Please take a look at http://blogs.jetbrains.com/teamcity/2011/12/01/setting-up-teamcity-as-a-native-nuget-server/ or http://confluence.jetbrains.net/display/TCD7/NuGet for more details. I hope it will help you to solve version number patching problems

23 Mar 2012

Hi Eugene,

Thanks. The NuGet support in TeamCity is brilliant, but unfortunately it can't be used for creating Octopus packages from a project file. This is because it uses some of the NuGet conventions (like putting DLL's in /lib) that don't make sense when deploying applications.

You can however use two build steps - one to compile/publish the website, and then a second NuGet Pack step that runs on the .nuspec (rather than the .csproj). OctoPack basically combines those two steps into one.


Kori Francis
Kori Francis
23 Mar 2012

Hey Paul,

I've tried the steps you've outlined:

  • Create new MVC3 site
  • Add Deploy.ps1
  • Create nuspec (ran nuget spec myproj.csproj), then removed all the templated fields.
  • Ran Install-Package OctoPack
  • Checked into TFS 2010
  • Added Build Configuration as specified

But, I'm getting the following error:

The imported project "C:\BuildAgent\work\77f4d223f57e22e\packages\OctoPack.1.0.90\targets\OctoPack.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I've seen this before, and it only seems to work if I at least check in the OctoPack.targets file (which doesn't seem right, or wasn't specified in your blog post). Did I miss a step? If I do check that file in (add existing item, check pending changes in) along with the nuget.exe then I can get this all working.


24 Mar 2012

Hi Kori,

The 1.0.90 version of OctoPack expected OctoPack and NuGet to be checked into source control. I've just merged this pull request by Jeff French which allows OctoPack to work when the "NuGet Package Restore" feature is enabled.

To do this, you'll need to do an Update-Package OctoPack, and check in the .octopack directory in the solution root.

Hope this helps,


13 Apr 2012

Great post and I really like your project. I've just started to use it and so far so good. However, there are two things I haven't got my head around yet.

  1. How do you set up continous deployment?
  2. Deployment of database, how is that supposed to work. I couldn't find anything in the support area of Octopus.
Dave Nay
Dave Nay
19 Apr 2012

Hi Paul,

Octopus is looking like a great utility for our company, even though I am planning to use it for something that you have suggested it's not appropriate for (xcopy deployment of WinForms/WPF application).

I do have one question though...does the Octopus dashboard provide for "going backwards" and reverting to an earlier version?

19 Apr 2012

Hi Dave,

You can locate an older version and forcible re-deploy it to an environment. E.g., you might deploy 1.1 to production, then 1.2, and then 1.1 again when a problem is discovered with 1.2.

Hope that helps,