Sean Feldman
Sean Feldman

Reputation: 26067

Packaging Service Fabric application

When building a Service Fabric application on a build server, is there a way to get a deployment package built with .sfproj / nuget combination? Digging around found that there's a .sfpkg option, but it is not clear how to build that using MSBuild.

Upvotes: 1

Views: 1146

Answers (1)

Sean Feldman
Sean Feldman

Reputation: 26067

The possible duplicate is showing how it package a service fabric application from a command line. I was after achieving the same when building a solution in release mode. This section can be added to the .sfproj file to achieve the goal:

<Target Name="ReleaseAfterBuild" AfterTargets="AfterBuild" Condition=" '$(Configuration)' == 'Release' ">
   <MSBuild Projects="$(ProjectPath)" Targets="Package" />
</Target> 

Upvotes: 3

Related Questions