1
votes

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.

1
Precisely what I was after. Thank you.Sean Feldman

1 Answers

3
votes

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>