1

I'm using MSBuild with the community tasks under TeamCity.

Just like Garrett in this thread, I update my AssemblyInfo.cs files, and then commit them.

In the solution at hand, I've got five AssemblyInfo.cs files, but only four get committed using this MSBuild code:

<Target Name="VersionCommit" DependsOnTargets="Version">
    <ItemGroup>
      <AssemblyInfoFiles Include="**/Properties/AssemblyInfo.cs;" />
    </ItemGroup>

    <SvnCommit Message="Updated verions in AssemblyInfo files." 
               Username="cc" 
               Targets="@(AssemblyInfoFiles)">
    </SvnCommit>
</Target>

I've verified that the RegEx pattern above works, i.e. finds all five files.

Any ideas why one of the files doesn't get committed?

Community
  • 1
  • 1
Martin R-L
  • 4,039
  • 3
  • 28
  • 28

2 Answers2

1

This is embarrassing...

The RegEx pattern worked alright, but a bug in another RegEx used for actually updating the files didn't make the missing file dirty as it was supposed to.

Martin R-L
  • 4,039
  • 3
  • 28
  • 28
0

Did you svn add the file first?

As an aside, people often get fooled by TortoiseSVN which gives you those handy little checkboxes -- they think that when they check a box on the Commit screen that they're somehow passing files to svn commit -- what they're really doing is telling Tortoise to svn add and then svn commit.

Dave Markle
  • 95,573
  • 20
  • 147
  • 170
  • All five files are added and found in the SVN Repository Browser. – Martin R-L Aug 16 '10 at 12:53
  • Have you tried running msbuild in verbose mode? I believe the switch is /v:verbose or something like that. I can't look it up because I'm on my iphone now... :-) – Dave Markle Aug 16 '10 at 13:11
  • TeamCity runs the MSBuild file, and I think the log is pretty verbose. Is there a way to make it even more verbose, i.e. tell TeamCity to use the switch you mention? I can't run the script locally due to that I don't have SVN installed (maybe a good idea to install it...). – Martin R-L Aug 17 '10 at 06:53