VSO Build successful but doesn't publish to octopus

I have successfully setup octopack for my aspnet project and can deploy to octopus via msbuild command line on my local machine.

However when I attempt to use the same arguments on in msbuild on VSO the build is successful but on packages appear in my octopus repository. I have attempted deleting all packages from the repository to see if it was not replacing it but there is no change.

Build command:

Successfully installed 'OctoPack 3.0.33'.
Successfully installed 'Microsoft.AspNet.WebApi.Cors 5.1.1'.
Successfully installed 'Microsoft.Net.Http 2.2.19'.
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.1.2'.
Successfully installed 'Microsoft.Data.Edm 5.6.1'.
Successfully installed 'System.Spatial 5.6.1'.
Successfully installed 'Microsoft.Bcl 1.1.7'.
Successfully installed 'Microsoft.Data.OData 5.6.1'.
Successfully installed 'jquery-globalize 0.1.3'.
Successfully installed 'TelerikMvcExtensions 2012.2.607'.
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\MSBuild.exe /nologo /noconsolelogger "C:\a\src\src\SmartStoreNET.sln" /nr:False /fl /flp:"logfile=C:\a\src\src\SmartStoreNET.log;encoding=Unicode;verbosity=normal" /p:SkipInvalidConfigurations=true /p:DeployOnBuild=true /p:RunOctoPack=true /p:OctopusPublishPackageToHttp=http://octopus.blackspacemedia.com/nuget/packages /p:OctopusPublishApiKey=API-CXVXSCCTWFGU5O9JVZ6OBSQY /m /p:OutDir="C:\a\bin\\" /p:Configuration="Release" /p:Platform="Any CPU" /p:VCBuildOverride="C:\a\src\src\SmartStoreNET.sln.Any CPU.Release.vsprops" /dl:WorkflowCentralLogger,"C:\lightrail\Services\Mms\BuildProvisioner\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;BuildUri=vstfs:///Build/Build/1009;IgnoreDuplicateProjects=False;InformationNodeId=10;TargetsNotLogged=GetNativeManifest,GetCopyToOutputDirectoryItems,GetTargetPath;TFSUrl=https://blackspacemedia.visualstudio.com/DefaultCollection;"*WorkflowForwardingLogger,"C:\lightrail\Services\Mms\BuildProvisioner\Tools\Microsoft.TeamFoundation.Build.Server.Logger.dll";"Verbosity=Normal;" /p:BuildId="1c57f710-5986-44f6-8a59-1107192ce2a6,vstfs:///Build/Build/1009" /p:BuildLabel="Takeaway_20141203.1" /p:BuildTimestamp="Wed, 03 Dec 2014 06:43:37 GMT" /p:BuildDefinition="Takeaway"

I have attached the msbuild log file.

logs.zip (242 KB)

Hi Chris,

Thanks for reaching in. Your log shows that Octopack is successfully packing your app, which is good. Like you mentioned, i dont see a line referring to package upload to your feed. A regular log with the upload included should look like this:

[...]
  OctoPack: Attempting to build package from 'OctopusDemo.nuspec'.
  OctoPack: Successfully created package 'C:\a\src\OctopusDemo\obj\octopacked\OctopusDemo.1.0.0.0.nupkg'.
  OctoPack: Copy file: C:\a\src\OctopusDemo\obj\octopacked\OctopusDemo.1.0.0.0.nupkg
  OctoPack: OctoPack successful
  Publish to repository: http://MyOctopus.net/nuget/packages
  "C:\a\src\packages\OctoPack.3.0.32\tools\NuGet.exe" push "C:\a\src\OctopusDemo\obj\octopacked\OctopusDemo.1.0.0.0.nupkg" API-ABCDEFG123456 -s http://MyOctopus.cloudapp.net/nuget/packages 
Pushing OctopusDemo 1.0.0.0 to 'http://MyOctopus.cloudapp.net/nuget/packages'...
  Your package was pushed.
[...]

By the looks of what you pasted on your original post, you are passing the OctopackPublishPackageToHttp parameter, but your build definition doesnt seem to be picking it up. Can you double check that the parameter is on your build definition as shown on the screenshot i’ve attached?

Thanks!
Dalmiro.

thanks it turns out I was using OctopusPublishPackageToHttp rather than OctopackPublishPackageToHttp.

Now i just have to get octupus to use the build number as the version number.

Hi Chris,

Glad you got that working! you copied the wrong parameter right on your first post and I didn’t notice it either. So it was my bad as well :wink:

Thanks for getting back to tell us how you fixed it. That’s what the cool guys do!

Dalmiro