TeamCity - AssemblyInfoPatcher 不工作,记录错误

TeamCity - AssemblyInfoPatcher not working, error is logged

AssemblyInfoPatcher 构建功能无法正常工作。有些文件已打补丁,有些则没有。

Assembly file version was specified, but couldn't be patched in file D:\TeamCity\Agent\buildAgent\workafd998e316c631f\La\Di\Da\Properties\AssemblyInfo.cs. Is necessary attribute missing?

我认为是因为它是 1.0.* 因为失败的文件之一是这种格式,而成功的文件之一是默认的 1.0.0.0 格式,所以我将属性更改为 1.0.0.0 跨越整个解决方案,现在 none 有效。

我得到上面的错误或者:

Assembly version attributes were not found in ...

属性已定义,团队中至少有两个人确认他们也可以用生产眼看到它。

很高兴掏出现金,这样我就可以砸碎我的工作键盘了。

嗯,我设法使它工作但没有。

我有一个名为 AssemblyVersionStringWithCounter 的配置参数,它是我从 PowerShell 脚本设置的。我在修补程序功能中使用了它。

我将其更改为由其他参数组成,例如

%MajorVersionNumber%.%MinorVersionNumber%.%BuildWeek%.%build.counter%

现在它修改了文件但没有设置参数,版本不正确。似乎 AssemblyInfoPatcher 无法使用在构建步骤中设置的值。

似乎我已经浪费了我客户大约 800 英镑的钱,而我本应该从一开始就对其进行 PowerShelled。代码为王。