Using Microsoft.Build.Evaluation to publish a database project (.sqlproj)

后端 未结 4 2031
耶瑟儿~
耶瑟儿~ 2020-12-09 04:57

I need to be able to publish an SSDT project programmatically. I am looking at using Microsoft.Build to do so but can not find any documentation. It seems pretty simple to c

4条回答
  •  清歌不尽
    2020-12-09 05:43

    You should use SqlPackage.exe to publish your dacpac.

    SqlPackage.exe 
      /Action:Publish 
      /SourceFile:C:/file.dacpac 
      /TargetConnectionString:[Connection string]
    

    Also instead of passing too many parameters you could save your settings into DAC Publish Profile (this can be done from visual studio)

提交回复
热议问题