TeamCity - AssemblyInfoPatcher not working, error is logged

我与影子孤独终老i 提交于 2020-01-15 05:05:29

问题


The AssemblyInfoPatcher build feature isn't working. Some files are patched and some are not.

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

I thought it was because it was 1.0.* since one of the failed files had this format, and one of the successful ones had the default 1.0.0.0 format, so I changed the attribute to 1.0.0.0 across the entire solution and now none of them work.

I get either the error above or:

Assembly version attributes were not found in ...

The attribute is defined and at least two other people on the team have confirmed that they can also see it using their production eyes.

Happy to stump up the cash so I can smash my work keyboard.


回答1:


Well, I managed to get it working but not.

I had a Configuration Parameter called AssemblyVersionStringWithCounter that I set from a PowerShell script. I was using this in the patcher feature.

I changed it to be composed of other parameters like

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

And now it mods the files but the params are not set, the version is incorrect. Seems the AssemblyInfoPatcher cannot use values set during the build steps.

Seems I've wasted about £800 of my client's money when I should have just PowerShelled it from the start. Code is King.



来源:https://stackoverflow.com/questions/33938529/teamcity-assemblyinfopatcher-not-working-error-is-logged

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!