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 ?
Thanks for reaching out. Sorry but I’m not sure I understand your question. The command you pasted takes care of
- Building your app
- Packing it
- 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 ?
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
Thanks for your reply
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
DdD retail A/S
Office +45 70 22 30 10 / Fax. +45 70 22 30 11
Direct +45 87 24 98 84 / Mobile +45 25 42 99 97
Thanks for the explanation! I guess my brain was working a bit slow back then
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!