Question
How can I read the version from the AssemblyInfo.cs
file and set it as %build.number%
in TeamCity?
More Info
Basically I want to read the version (2.2.0) in this example:
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("97f3f431-69a7-48c2-8bf8-7ae29075b72e")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.2.0")]
[assembly: AssemblyFileVersion("2.2.0")]
[assembly: NeutralResourcesLanguage("en-US")]
and use it as my %build.number%
in the TeamCity project