In the project settings of a database project I can set the version number form my data-tier application, however setting this manually is a bit inefficient. I would like to automatically increment the build number, as with other VS projects. How can this be done ? At the same time I would like to see this version number in the generated dacpac file.
Sql-server – Automatic Version increment on Data-Tier Applications
data-tier-applicationsql serversql-server-2012ssdt
Related Question
- Sql-server – Howto create useful dacpac versioning along with SSDT deployment
- Sql-server – SQLPackage.exe not picking up changes
- Sql-server – DACPAC and database drift: db users are always detected as drift even when nothing has changed
- Sql-server – way to easily validate that a SQL Script is compatible with a specific SQL Server version
- Sql-server – Error creating memory optimized filegroup in SSDT
- Sql-server – Excluding database objects from a DacPac database deployment
Best Answer
I found this forum thread had an answer that worked well: Automatic Version increment on Data-Tier Applications
Minimum steps are:
Create
Properties\AssemblyInfo.cs
if it doesn't already exist, and make sure it's included in the project and contains at least this code:using System.Reflection; [assembly: AssemblyVersion("1.0.*")]
Or however you want your version number to go.Edit the
*.sqlproj
file in an outside editor (notepad etc) and add the following XML: