Dave
Dave

Reputation: 15016

TeamCity's AssemblyInfo patcher's number format

I once had TeamCity + WiX + MSBuild Community Tasks working. Now that I've upgraded to WiX 3.5, I can't remember how I had configured it. :) As I was poking through TeamCity, I came across the "AssemblyInfo Patcher". I thought, "Great! This will make my life much easier!". I used %build.vcs.number.1% for the format and built my installer.

While the patcher did pull in the vcs number, it used it for the major number in the version. So instead of 1.0.0.xxxx, it made the version xxxx.0.0.0.

I looked through JetBrain's documentation site and came up with nothing related to changing this to a more appropriate setting. I also looked for regex support, but didn't find anything.

Can anyone suggest a good solution, or should I just go back to trying to configure my original set of tools?

Upvotes: 7

Views: 5931

Answers (3)

Per-Frode Pedersen
Per-Frode Pedersen

Reputation: 1027

The assembly info patcher only patches the complete version string at once. But the system variable build.number can be generated from the "general" page of the build configuration, like this: General settings

When you specify %build.number% as your AssemblyInfo version, it will pick up the combined number from your General settings page.Assermbly info patcher

Upvotes: 11

JonAlb
JonAlb

Reputation: 1720

Hmmm haven't seen AssemblyInfo Patcher but you can do it manually using MsBuild and Regex:

http://jonalb.com/post/2010/10/04/Automatic-Versioning-using-TeamCity-an-MSBuild.aspx

Upvotes: -3

Bilal
Bilal

Reputation: 922

Try including the full intended version number as part of your format:

1.0.0.%build.vcs.number.1%

Upvotes: 2

Related Questions