An ASP.NET template works -
- Use NuGet
- NuGet Restore
- Build solutions
- Test Assemblies
- Copy dacpac (This is added)
- Publish symbols path
- Publish artifact
VSTS -> Deployment Groups -> New -> Then it generates script to build and configure on server
The script will ask you 1. tags? 2/ What user do you want to run under?
VSTS -> Releases:
Phase 1: IIS Deployment and Phase 2: DB Deployment
VSTS SSDT Project encapsulates your database schema
This can be checked into source control.
In VSTS, it will build automatically with ASP.NET build task, the artifact will be dacpac
dacpac must be copied to release folder (as a copy task)
Use SQL Server DB Deploy Task - this will do schema compare, and generate scripts to update DB on server
It won't let you destroy data when automated
It uses SqlPackage.exe under the hood. You can add any of these commands in Additional Arguments.
eg.
/p:BlockOnPossibleDataLoss=False