I canโt speak for the database part, but I just went through it on the web part, the magic part is not very well documented , namely MSBuild parameters.
In the assembly definition:
- The process is on the left.
- Required> Elements for assembly> Configurations for assembly
- Change, add new, for this example
- Configuration: Dev (I will talk about how to create a configuration below)
- Platform: Any processor
- Advanced> MSBuild Process
- Use the following arguments (at least for me the publishing method may be different).
MsBuild Params:
/p:MSDeployServiceURL="http://myserver" /p:MSDeployPublishMethod=RemoteAgent /p:DeployOnBuild=True /p:DeployTarget=MsDeployPublish /p:CreatePackageOnPublish=True /p:username=aduser /p:password=adpassword
Requirements:
- You need to install MS Deploy Remote Agent Service on the target web server, MSDeploy should be on the Build / Deployer server, but this should be the default.
- The account used in the settings above requires administrator access, at least to IIS ... I'm not sure what the minimum permission requirements are.
In the web project you are deploying, the website / virtual directory is configured. Personally, I have an assembly configuration for each environment, which makes the assembly very easy to handle and organize. For example, we have Release , Debugging and Dev (there are more of them, but for this example it is). Only a web project has a Dev configuration.
To do this, right-click on the solution, Configuration Manager .... In a web project, click the drop-down list , click Create .... Give it the name "Dev" for this example, copy the settings from debug or release, regardless of which is closest to your deployment server environment. Make sure "Create new solution configurations" is checked by default. Having created this, change the configuration drop-down menu to the new Dev , and Any processor ... make sure your projects are correct, I had some x86 and x64 clicks randomly, not sure about the exact reason for this).
In your web project, right-click properties. On the left, click Package / Publish Website (you will also want to merge with the other โPackage / Publish SQLโ tab, but I can't talk about it). In the options on the right, click Create deployment package as a zip file . The default location is excellent, the next text box that I did not find is not registered anywhere. Format: WebSite / Virtual Directory , so if you have a site called "BuildSite" in IIS without a virtual directory (application == root of the site), you will only have BuildSite in this field. If it was in a virtual directory, you might have Default Web Site / BuildVirtualDirectory .
After you install all this, make sure you register the solution and the web project so that the build server has your configuration changes and then starts the build :)
If you have more questions, I recommend that you watch this Vishal Joshi video , in particular about 22 and 59 minutes, it also covers part of the database ... but I have no real experience, since we are at the top of the database without MSSQL.