TeamCity OctopusDeploy: Pack step not using nuspec file

Trying to get TeamCity and OctopusDeploy to build and deploy my .Net 4.7.2 MVC web application. All works well except for one step which is the OctopusDeploy: Pack step that comes after the msbuild step. I have created a .nuspec file and named it the same as the .csproj file and they are in the same folder. When building the solution locally using OctoPack msbuild Project.sln /t:Build /p:RunOctoPack=true "/p:OctoPackNuGetProperties=version=1.0.0" it works correctly and my specific nuspec files is all that is included. But when running the Pack step in TeamCity it seems that it doesn’t use the .nuspec file at all and all csproj references to files is included in the build. How do I get the Pack step to use my nuspec file?

Update:
Managed to solve the nuspec issue by instead of using the pack step call the msbuild with the /p:RunOctoPack=true /p:OctoPackPackageVersion=1.0.%build.number% /p:OctoPackNuGetProperties=version=1.0.%build.number% params.

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.