Post-build VS Octopack

Hi
We are currently using a console MS-build command to build and automatic deploy a Nuget Package. This works well. However can’t figure out how to make an automatic post-build event in VS that does the exact same as below:

msbuild DdDService.sln /t:build /p:RunOctoPack=true /p:OctoPackPublishPackageToHttp=ServerName:8080/nuget/packages /p:OctoPackPublishApiKey=APIKEY

Any ideas ?

Hi Morten,

Thanks for reaching out. Sorry but I’m not sure I understand your question. The command you pasted takes care of

  1. Building your app
  2. Packing it
  3. Pushing the package

Since the build is already being ran on that command, I dont understand what do you want to run as post-build exactly.

Also, are you doing this straight on Visual Studio, are are you using a build server like TFS/Visual Studio Online ?

Thanks,

Dalmiro

If you could explain me what do you want to run during the building of DdDService.sln and what do you want to run as post-build, that would help my slow brain :slight_smile:

Hi Dalmiro.

Thanks for your reply :slight_smile:

We are doing it inside visual studio as a test (We are working on build in TFS later).
What we want to achieve is simply:
“Every time your build the project, make a nuget package and push it to our OctoPus deploy server”.

The msbuild I pasted does this perfectly, but from a command prompt. We are investigating how to do this by a post-build command in Visual Studio.
We have got it to work by assigning property groups directly in the .csproj file, and this works. However you can’t see this anywhere in Visual Studio then, and would be transparent to foreign developers.

Med venlig hilsen / Best regards

Morten V. Gade
Development Manager

[cid:image001.jpg@01C9C284.794DC020]

DdD retail A/S

Papirfabrikken 74
8600 Silkeborg
Office +45 70 22 30 10 / Fax. +45 70 22 30 11
Direct +45 87 24 98 84 / Mobile +45 25 42 99 97

image001.jpg

Hi Morten,

Thanks for the explanation! I guess my brain was working a bit slow back then :slight_smile:

Post build-events might be what you are looking for https://msdn.microsoft.com/en-us/library/ke5z92ks.aspx

See attached screenshot for a brief example

Hope that helps!

Dalmiro