Disable automatic Artifact publication in TeamCity

I have a TeamCity project building a solution using the MSBuild runner and the Octopack plugin (and the Octopack package installed in the appropriate csproj file).

I’m rewriting that TC project to eliminate the usage of the separate build runners (MSBuild, NUnit, etc) in favor of a single build step using the Powershell runner to call the “CIBuild” function.

In the original, legacy TC project, Octopack was not directly informing TC to publish the generated nupkg as an artifact. The second project, Octopack IS informing TC to publish the nupkg as an artifact. That is NOT what I want. I want TC artifacts to be solely identified via the settings on the “General Settings” page. Octopack is adding to those settings.

This is the msbuild command used in the Powershell script:

& msbuild $solutionFullPath `
    /t:Restore`;Build`;Pack `
    /p:Configuration=Release `
    /p:Version=$Script:buildVersion `
    /p:AssemblyVersion=$Script:buildVersion `
    /p:Copyright="$(Get-Date)" `
    /p:PackageOutputPath=$packageDirectory `
	/p:RunOctoPack=true `

To be clear, I do not want Octopack to auto-publish ANY artifact to TeamCity. There is a mechanism in TC to identify all artifacts for the TC project based upon directories and that is the mechanism I want to use.

Is there a way to turn off Octopack’s publishing of an artifact. There appears to be some way to do that since the legacy project, using the MSBuild runner and provided the same providers, does have the same result.

I just found the PublishPackagesToTeamCity option. Perfect.

Hi David,

Thanks for getting in touch! Great to hear you’ve found what you were looking for. Don’t hesitate to reach out if you have any other questions or concerns in the future. :slight_smile:

Best regards,


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