1

We have multiple projects each with a link to a SharedAssemblyInfo file which has info on the author, version, etc. We have just started using TeamCity and I am trying to use the AssemblyInfo patcher and there is an option to patch GlobalAssemblyInfo files.

This isn't working on our SharedAssemblyInfo files, I have tried searching but I cannot find the requirements on this file, does it have to be called GlobalAssemblyInfo? Where should it be in relation to the solution file so that TeamCity can find and update the version number?

user351711
  • 3,171
  • 5
  • 39
  • 74
  • 1
    Can't suggest anything that's not available from the (brief) [official documentation for the AssemblyInfo Patcher](https://confluence.jetbrains.com/display/TCD8/AssemblyInfo+Patcher). Looks like it searches for AssemblyInfo and (since TC v8.1.3) GlobalAssemblyInfo. – Siy Williams Oct 29 '14 at 16:27
  • The documentation is indeed brief, I've tried adding a GlobalAssemblyInfo.cs file and it isn't overwriting it with the version number from the build and my google skills have let me down trying to find out a specific location and format that is required of the GlobalAssemblyInfo file. I'll have to hope someone has the answer or I come across a useful article. – user351711 Oct 29 '14 at 17:50
  • How are you checking that the version is being updated in your files? Remember the patcher reverts its changes after the build is complete, so if you're checking the file after the build has finished it will look like it hasn't actually changed it. – Siy Williams Oct 30 '14 at 14:28
  • I am checking the dll version contained in the artifact packages. – user351711 Oct 30 '14 at 15:00
  • see also http://stackoverflow.com/questions/25828622/teamcity-support-for-globalassemblyinfo-cs – Ruben Bartelink Sep 25 '15 at 11:56
  • IME [naming it `SharedAssemblyInfo.cs` as is conventional](http://stackoverflow.com/questions/6771694/shared-assemblyinfo-for-uniform-versioning-across-the-solution) and putting it beside the `.sln` in the root of the repo won't cut it – Ruben Bartelink Sep 25 '15 at 11:58

1 Answers1

0

I moved the GlobalAssemblyFile to the same folder as the solution and it's picking it up now. Not sure why it wasn't before but oh well, at least it's working now.

user351711
  • 3,171
  • 5
  • 39
  • 74