0
votes

I am trying to automate build and deployment of .Net windows service and SQL server scripts using Jenkins.

For .Net windows service, I am able to use MSBuild to create release exe/dlls. I have zipped the release folder and uploaded to Nexus.

For SQL server scripts, I have started using SSDT and able to create .dacpac file. I am also able to generate deployment script for a specific server using the .dacpac file. I have uploaded the .dacpac file to Nexus.

I am not sure what the best practices to deploy .Net artifacts from Nexus. I have the following questions:

  1. How do I deploy .net Nexus packages? (do I unzip them and use InstallUtil to install the service?)

  2. How do I deploy sql .dacpac Nexus package? (do I unzip the package and use SQLPackage to generate a script for the target database server?)

Are there any better ways to deploy .Net Nexus packages?

1

1 Answers

0
votes

Use NuGet packages and upload NuGet packages to nexus.

  1. create a NuGet package using nuget pack command. You can do this part of your msbuild
  2. Push the above created NuGet package to Nexus using nuget push command.

Here is the link about how to setup .Net Package repositories in Nexus

https://help.sonatype.com/repomanager2/.net-package-repositories-with-nuget