views:

23

answers:

2

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?

A: 

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
All five files are added and found in the SVN Repository Browser.
Martin R-L
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
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
+1  A: 

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