TeamCity - dynamic parameter in AssemblyInfo Patcher

I have a build that has a custom build step that reads a text file from the repository and writes it to the build.version configuration parameter. I am trying to use this value in the AssemblyInfo patch as follows:% build.version%.% System.build.number%.

The line continues to fail with an error similar to:

error CS0647: error while emitting attribute 'System.Reflection.AssemblyVersionAttribute' - 'The specified version'.26' is invalid '

After completing the build, I see on the Options tab that build.version is set to the correct value.

Am I doing something wrong here or is there a better way to do this?

UPDATE: Now I see in the build log that the AssemblyInfo patcher works until my first build step, which sets the value. Is there any way to delay it until the first build step?

+4
source share
3 answers

There is no workaround for this inside TeamCity. It always runs the AssemblyInfo patcher before the first build phase.

I decided to solve this problem using Rake and Albacore for my build script. This allowed me to customize my version control, as well as have a good side effect, allowing me to test my build before running it in TeamCity.

+2
source

From TeamCity documentation :

( ) . , -.

( " " ). .

0

- , . % dep.PARENT_BUILD_ID.build.number%. , AssemblyInfo Patcher. . fooobar.com/questions/617806/...

0

All Articles