AssemblyInfo patcher not working

[Update assembly versions] Updating assembly version in C:\...\work\xxxxxxxxxx\GlobalAssemblyInfo.cs
[10:15:28][Update assembly versions] Assembly file version was specified, but couldn't be patched in file C:\...\work\xxxxxxxxxxxxx\GlobalAssemblyInfo.cs. Is necessary attribute missing?
Using TeamCity Enterprise 9.1.5 (build 37377)
My GlobalAssemblyInfo.cs:
using System;
using System.Reflection;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyCompany("xxxxxxx")]
[assembly: AssemblyProduct("xxxxxxx")]
[assembly: AssemblyCopyright("xxxxxxxxxxxxxxxx")]
[assembly: AssemblyTrademark("")]

[assembly: AssemblyConfiguration("xxxxx")]
[assembly: AssemblyDescription("xxxxxxx")]

[assembly: CLSCompliant(true)]

[assembly: ComVisible(false)]

[assembly: AssemblyVersion("")]
[assembly: AssemblyInformationalVersion("")]
The GlobalAssemblyInfo.cs file is in the same dir as the solution file. Even tried with Assembly version format: hardcoded in TeamCity....

Hello Miguel,

Sorry for delay.

There should be the following attributes in the GlobalAssemblyInfo.cs file: AssemblyVersion, AssemblyFileVersion and AssemblyInformationalVersion. See the documentation for details.

If all attributes are present, but feature still does not work, then please attach build log and screenshot of Assembly info patcher feature. 


I was missing the AssemblyFileVersion attribute. It's a shame that the build log doesn't say anything about this.




Please sign in to leave a comment.