Adding same msbuild file as build step multiple times to same build configuration

Hello,
I've added the same msbuild file as build step multiple times to same build configuration. However when Teamcity finishes executing the first build step and starts the next one it fails with following error:

2012-03-23 10:29:49,850 [5732] WARN  JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildGeneratedFilesDumper - The file 'D:\TeamCity\buildAgent\temp\buildTmp\msbuild-BuildSolutionAndDiscardAllFilesOnEdit.proj.teamcity.633540096000000000..teamcity' already exists.

[10:29:49][MSBuild output] System.IO.IOException: The file 'D:\TeamCity\buildAgent\temp\buildTmp\msbuild-BuildSolutionAndDiscardAllFilesOnEdit.proj.teamcity.633540096000000000..teamcity' already exists.

[10:29:49][MSBuild output]    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

[10:29:49][MSBuild output]    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)

[10:29:49][MSBuild output]    at JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildGeneratedFilesDumper.CopyToTemp(String file) in c:\BuildAgent\work\dc6fdb6ba3889d18\src\MSBuildBootstrap.Core\src\Impl\MSBuildGeneratedFilesDumper.cs:line 64

[10:29:49][MSBuild output] 2012-03-23 10:29:49,871 [5732] WARN  JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildGeneratedFilesDumper - The file 'D:\TeamCity\buildAgent\temp\buildTmp\msbuild-BuildSolutionAndDiscardAllFilesOnEdit.proj.teamcity.msbuild.tcargs.633540096000000000..tcargs' already exists.

[10:29:49][MSBuild output] System.IO.IOException: The file 'D:\TeamCity\buildAgent\temp\buildTmp\msbuild-BuildSolutionAndDiscardAllFilesOnEdit.proj.teamcity.msbuild.tcargs.633540096000000000..tcargs' already exists.

[10:29:49][MSBuild output]    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)

[10:29:49][MSBuild output]    at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)

[10:29:49][MSBuild output]    at JetBrains.BuildServer.MSBuildBootstrap.Impl.MSBuildGeneratedFilesDumper.CopyToTemp(String file) in c:\BuildAgent\work\dc6fdb6ba3889d18\src\MSBuildBootstrap.Core\src\Impl\MSBuildGenerat


BuildSolutionAnndDiscardAllFilesOnEdit.proj is the msbuild file. Is this a bug in teamcity that you can't run the same msbuild file multiple times for same build configuration? It looks to me that it just need to overwrite the existing file in here:

at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
1 comment
Comment actions Permalink

There's an issue for this bug with a patch.

http://youtrack.jetbrains.com/issue/TW-20875

Thanks Eugene for the patch.

0

Please sign in to leave a comment.