【发布时间】:2013-11-19 10:47:47
【问题描述】:
我在 TeamCity 上的 .NET 项目有问题。一切正常,除了有时 MSBuild 无法构建,因为在项目文件夹而不是 bin 目录中创建了一个名为“bin”的文件。我尝试删除“bin”文件并重新运行配置,然后它工作正常,但有时当 TeamCity 进行干净签出并重建解决方案时,问题再次发生:已经创建了一个名为“bin”的文件,因此MSBuild 无法创建 bin 目录并将输出文件复制到该目录。
以下是从构建日志中提取的一些文本:
[MyWebProject.csproj] PrepareForBuilBd
[21:06:46][PrepareForBuild] MakeDir
[21:06:46][MakeDir] Creating directory "bin\".
[21:06:46][MakeDir] C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(932, 5): warning MSB3191: Unable to create directory "bin\". Cannot create "E:\TeamCity\VCS\MyWebProject\MyWebProject\bin" because a file or directory with the same name already exists.
[21:06:46][MakeDir] The previous error was converted to a warning because the task was called with ContinueOnError=true.
[21:06:46][MakeDir] Creating directory "Help\".
[21:06:46][MakeDir] Build continuing because "ContinueOnError" on the task "MakeDir" is set to "True".
【问题讨论】:
标签: visual-studio-2012 msbuild continuous-integration teamcity