[TeamCity]the requested operation cannot be performed on a file with a user-mapped section open

[01:08:14][CopyAllFilesToSingleFolderForMsdeploy] CopyPipelineFiles
[01:08:14][CopyPipelineFiles] Copying bin\QAAWS\*****.dll to obj\QAAWS\Package\PackageTmp\bin\*****.dll.
[01:08:14][CopyPipelineFiles] C:\Program  Files  (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(2583,  5): Copying file bin\QAAWS\*****.dll to  obj\QAAWS\Package\PackageTmp\bin\*****.dll failed. The  requested operation cannot be performed on a file with a user-mapped  section open.



it seemed the problem happened all in a sudden, the build failed at copying files to output folder, and it failed on different files for each build, so seemed it's not problem with the file itself. I disabled anti-virus software, but no luck. I checked the *****.dll in ProcessExplore, tried to figure out whether there is any other program using that DLL, but no clue found. Since those files are actually in TeamCity/BuildAgent folder, I don't really think it's been used by any other program, seemed it's been locked by TeamCity itself.   TeamCity version is 8.1.5. DB is MSSQL.  Any suggestion?
4 comments
Comment actions Permalink

I fixed it by deleting all folders under  \buildAgent\work\

0
Comment actions Permalink

unfortunately, the issue came up again after a few builds...

0
Comment actions Permalink

seemed I've got another solution, tick "clean all files in the checkout directory before the build" in the VCS config

0
Comment actions Permalink

Please take a look at  Build Files Cleaner (Swabra), probably it can be useful in your case.

0

Please sign in to leave a comment.