Create Nuget package for Dacpac and Powershell script

丶灬走出姿态 提交于 2019-12-06 02:26:00

问题


How do I create a Nuget package in Visual Studio 2013 that includes a dacpac and a Powershell script? Would I have the two files in the same location then call nuget pack {folder name}? The Powershell script essentially deploys the dacpac to Octopus Deploy. I have the pieces, but I'm not sure how to put them together!


回答1:


Are your Powershell script and dacpac in the Visual Studio project? If not, you may not need to include VS in the process.

You can use either OctoPack or the NuGet command line tool.

Either way, you will need to create a nuspec file before you can run the pack command. You can create one manually following the format in the docs or you can use the nuget spec command to create one. Once you have the nuspec file, you can use nuget pack to create the nupkg file.

If the files have to be in a Visual Studio project, the steps are pretty much the same, but you might have to do a little extra work to get the deploy script in the correct spot for Octopus to call it.

Edit: This was posted recently http://swoogan.blogspot.ca/2015/04/deploying-dacpacs-with-octopus-deploy.html



来源:https://stackoverflow.com/questions/29416678/create-nuget-package-for-dacpac-and-powershell-script

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!