TeamCity, OctoPack 2.0 and NuSpec file naming conventions

When using the TeamCity plugin, my build log says it’s looking for a nuspec file like this: Project.csproj.nuspec.
This becomes a bigger issue when using a project as the compiler wants it to be named Project.nuspec.
I’ve tried to set a /p:OctopusNuSpecFileName=Project.nuspec parameter in my MSBuild build step, but it doesn’t seem to recognize it.

I’d prefer to name the nuspec file as Project.nuspec.

Any ideas?

In Visual Studio, if I name it Project1.vbproj.nuspec, I get this error at compile time:

Error 184 OctoPack: Expected to find a NuGet spec file named OneLegal.Services.ServiceMonitor.nuspec under c:\dev\Services\Project1. You can fix this error by adding a NuGet spec file with that name, or override the name of the file by setting a property called OctopusNuSpecFileName in your project.

In TeamCity, if I name it Project1.nuspec, then it can find the nuspec file, so it creates its own with the name Project1.vbproj.nuspec


I believe this is down to the way TeamCity patches MSBuild files by creating “Project1.csproj.teamcity” files.

You can specify a specific NuSpec file using:



I tried using /p:OctoPackNuSpecFileName=Project1.nuspec, but that didn’t work. I ended up editing the file and adding it in there.


This should now be fixed in OctoPack 2.0.18


Works like a charm! Thanks!