[Failure] Error while applying patch: Failed to change binary file


It all being when we experienced an issue with code changes made (which was booked into SVN and TeamCity was fine), so I reverted back to a previous release in SVN, checked the reverted version into SVN and TeamCity built it successfully.

I then incrementally added changes back into the reverted version and checked it into SVN, and when TeamCity ran I recieved the following issue:

[16:36:36]: Updating sources: server side checkout... (3s)

[16:36:39]: [Updating sources: server side checkout...]
Error  while applying patch: Failed to change binary file:  C:\Cowantr\trunk\src\Cowantr\SilverLightFormsEntityFramework\StyleCop.Cache.   C:\Cowantr\trunk\src\Cowantr\SilverLightFormsEntityFramework\StyleCop.Cache  (Access is denied) jetbrains.buildServer.vcs.patches.PatchException: Failed to change  binary file:  C:\Cowantr\trunk\src\Cowantr\SilverLightFormsEntityFramework\StyleCop.Cache.   C:\Cowantr\trunk\src\Cowantr\SilverLightFormsEntityFramework\StyleCop.Cache  (Access is denied)

And now the issue is that since this issue the project will not build in TeamCity and I get the same spurious error about missing references, along the lines of...
MassUpdate\AuthorisationSelector.xaml.cs(17, 20): error CS0234: The type or namespace name 'StockService' does not exist in the namespace 'SilverShared' (are you missing an assembly reference?)

When I check the project, the references are fine - the changes I book into SVN which prompted the initial [Failure] Error while applying patch build in the first place did not change any code in the SilverLight projects.

I have since removed the StyleCop.Cache file and attempted a rebuild... same references failure.

I've removed the entire folder TeamCity uses to build the solution to force an entirely new checkout but it has had no effect, i.e. TeamCity seemingly checks it out from SVN without issue.

Other projects build fine in TeamCity.

P.S. The solution builds and runs without issue in Visual Studio.

Any ideas please?

Comment actions Permalink

Nevermind... I worked out what the problem was eventually...

The initial failure on TeamCity must have caused the project folder to be deleted (the settings for the project did not clean the folder on checkout)...

The Solution dependencies were not building in the correct order, hence TeamCity couldn't find the assembly being referenced...

The issue remains as to why it builds ok in Visual Studio but not in TeamCity, don't both use the same build dependencies (inter solution)?

Comment actions Permalink

The discussion was continued here.


Please sign in to leave a comment.