Command-line Package Service Fabric Application

前端 未结 5 1349
Happy的楠姐
Happy的楠姐 2021-02-08 21:47

Our continuous delivery set-up, until recently, was delivering Service Fabric packages using the following command:

msbuild SFApp.sfproj /t:Package
5条回答
  •  旧巷少年郎
    2021-02-08 22:22

    It's bad idea to compile sfproj file(and any other project file) without sln, because it can bring wrong content to its output from referenced projects. Only solution has a knowledge about what project to compile in what configuration.

    To make Package similar to "Right Click->Package" in VS: Just add to your sfproj the following target

      
        
      
    

    And then running normal build on solution you may trigger the package step by /p:ForcePackageTarget=true :

    msbuild yoursolution.sln /t:Build /p:ForcePackageTarget=true /p:Configuration=Release /p:Platform=x64
    

    Actually it performs two-in-one steps, build and package, with respect to Solution Configurations on all referenced projects

提交回复
热议问题