Using Visual Studio 2013 with TFS and SQL Server 2012 & 2014, and SQLPackage.exe with a Publish profile.
Does anyone know if/how to get the Build version or Assembly version into a SQLCMD variable?
i.e. I'm trying to obtain whatever system-level build versioning information TFS/Visual Studio has about an SQL project build and push this into a SQLCMD variable and then insert that into a table.
I know that I can explicitly define an SQLCMD variable and then manually set and increment the value of it, but I want whatever build version number has for the project.
I've been able to get the Assembly version info via MSBuild, as detailed here: https://social.msdn.microsoft.com/Forums/sqlserver/en-US/e0c93a55-d8bd-4a32-89d9-f46013fc1235/automatic-version-increment-on-datatier-applications?forum=ssdt
But that is outside of my post-deploy.sql
script. I've tried simply referencing the $(IntermediateTargetAssembly)
variable, but the project won't build and errors that this variable not been declared.