How can I access the Build.BuildNumber
Azure variable from the inside of an ASP.NET application?
Is it the same as assembly number and can be retrieved using the (source)?
Assembly web = Assembly.Load("App_Code");
AssemblyName webName = web.GetName();
string myVersion = webName.Version.ToString();
I mean this Build.BuildNumber
:
The name of the completed build, also known as the run number. You can specify what is included in this value.
A typical use of this variable is to make it part of the label format, which you specify on the repository tab.
Note: This value can contain whitespace or other invalid label characters. In these cases, the label format will fail.
This variable is agent-scoped, and can be used as an environment variable in a script and as a parameter in a build task, but not as part of the build number or as a version control tag.