Octopus + TeamCity + Octopack dependancy problem

Hi,

I’ve spent a few days getting a sample web site up and running and getting a build and deploy process set up through TeamCity which then publishes to a NuGet feed which in turn is consumed by Octopus.

The first part works fine now - getting the build to work with Octopack so my files are in the correct format in the .nupkg file.

The problem I have now is when the tentacle attempts to deploy the nuget package. I get the following error:
ERROR System.Exception: NuGet packages with dependencies are not currently supported. The package ‘SampleProject 1.0.0.19’ appears to have dependencies.

I went and pulled out the nupkg to have a look at the nuspec and here is what it says:

<?xml version="1.0"?> SampleProject 1.0.0.19 A Sample Project Paul Inglis Paul Inglis false This is a Sample Project Copyright 2012

However my original nuspec in the project looks like this:

<?xml version="1.0"?>



SampleProject
$version$
A Sample Project
Paul Inglis
Paul Inglis
false
This is a Sample Project
Copyright 2012

Why does this dependency get injected?

Hi Paul,

Thanks for getting in touch, I’ll try to solve this tonight. When you set up the build in TeamCity, did you configure it as per this page?

Also, is your packages.config file marked as ‘copy local’ or ‘content’?

Paul

Yes, I used that article to set everything up, so it’s near enough for my non MVC project.

packages.config is marked as “Content”

Cheers,

Paul

Thanks Paul, if you change packages.config so that it is not marked as content (i.e., make it ‘None’) this should fix the problem.

When a file is marked as Content, it gets copied to the ASP.NET publish directory, and thus it gets included in the package and NuGet extracts the dependencies. If you make it None and do a clean build, it shouldn’t get copied and thus the dependencies shouldn’t get added.

Hope that helps,

Paul

That worked. Thanks! :o)