TeamCity 8.0 Help

AssemblyInfo Patcher

The AssemblyInfo Patcher build feature allows setting a build number to an assembly automatically, without having to patch the AssemblyInfo.cs files manually. When adding this build feature, you only need to specify the version format. Note that you can use TeamCity parameter references here.

When configured, TeamCity searches for all AssemblyInfo files (.cs, .vb, .fs or .cpp) in their standard locations under checkout directory and replaces the parameter for the AssemblyVersion, AssemblyFileVersion, and (since TeamCity 8.1.3) AssemblyInformationalVersion attributes with the build number you have specified in the TeamCity web UI.

Since TeamCity 8.1.3, GlobalAssemblyInfo files are supported.

Note that this feature will work only for "standard" projects, i.e. created by means of the Visual Studio wizard, so that all the AssemblyInfo files and content have a standard location.

At the end of the build the files are reverted to the initial state.

Last modified: 20 April 2023