2

I've a little PS script to write this TC integration command:

##teamcity[setParameter name='AssemblyVersionString' value='1.0.46.48'

Which sets a Configuration Parameter which appears to run fine in the logs. The Configuration Parameter is defined at the project level and has a default value.

Eventually I want to use the AssemblyInfoPatcher but for testing, I've added a Build Feature to tag the git repo but its tagging with the default value.

Are changes during the build supposed to be 'visible' to the Build Features when they run??

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266

1 Answers1

1

Nailed it.

By looking in the (very useful) Parameters tab after the build completes, all the values made available to the build are listed, along with a little icon for those that are altered during the build!

My AssemblyVersionString parameter was unchanged. This caused me to check carefully the logs and I noticed that the terminating ] was missing!

Fixed my PS script and its working. I'm going to go to lunch now if that's alright.

Luke Puplett
  • 42,091
  • 47
  • 181
  • 266
  • 4
    I don't think this will work. The AssemblyInfoPatcher "wraps around" your build steps: it patches the AssemblyInfo files right after they are checked out, and _before_ your steps run, then "unpatches" them after your steps complete (regardless of the status of the build). Think of it as a big `using (AssemblyInfoPatcher(version)) { [your steps come here] }` block around your build configuration. Hence, if you want to set `version` based on config params, they must be params that exist _before_ your build steps have run. – sferencik Nov 26 '15 at 12:52