1

I have an Azure web service and accompanying sql-azure db that both need to expose a version number. The service is straight forward: update the assemblyinfo to generate based on revision & build, and just expose that.

How can I do something similar in the db? I had toyed with an auto-incremented number, but that increments the 'version' even if I deploy the same bits twice and does not guarantee continuity across servers with the same bits. And, because it's sql-azure, I don't believe I can pull the value from assemblyinfo, can I?

If I can expose the same build number the service shows, that'd be great, but it's not required.

b34r
  • 589
  • 1
  • 10
  • 22

1 Answers1

1
  1. Have a Version table in the database
  2. Use a custom MSBuild Task to get the build number
  3. You can update a sql file with the 'MERGE' with build number using FileUpdate MSBuild community task
  4. Execute it as part of deployment.

Now, you'll have same version number in both database & your assemblies.

Community
  • 1
  • 1
Vyas Bharghava
  • 6,372
  • 9
  • 39
  • 59