问题
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