TFS 2012 构建“访问路径被拒绝" [英] TFS 2012 Build "Access to Path Denied"

查看:51
本文介绍了TFS 2012 构建“访问路径被拒绝"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 TFS 2012 Build 并遇到错误

I’m using TFS 2012 Build and running into an error

访问路径被拒绝

正在构建的解决方案包含大约 15 个项目,其中一些项目使用 Castle.Components.Validator.2.5.0 程序集.

我看过其他帖子讨论 TFS 构建访问被拒绝错误,但通常指同时运行构建.在这种情况下,一次只运行一个构建.此外,当服务器重新启动或构建有一段时间没有运行时会发生错误.

一旦构建运行失败,下一个成功,之后的每个都再次成功,直到构建没有运行一段时间或服务器重新启动.虽然我们可以解决这个问题,但手动操作很头疼.

这里是错误:

The solution being built contains about 15 projects of which a number are using the Castle.Components.Validator.2.5.0 assembly.

I have seen other posts that talk about the TFS Build Access Denied errors, but they generally refer to having simultaneous builds running. In this case only one build runs at a time. Also, the error occurs when the server is restarted or the build has not run for some time.

Once a build is run and fails, the next one succeeds and each one after that succeeds again until the build hasn’t been run for a while or the server is restarted. Although we can get around this, it is a manual headache.

Here is the error:

C:WINDOWSMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets (3513):无法复制文件D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll"到D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

拒绝访问路径D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

C:WINDOWSMicrosoft.NETFramework64v4.0.30319Microsoft.Common.targets (3513): Unable to copy file "D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll" to "D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

Access to the path 'D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll' is denied.

查看日志文件时,您可以看到构建尝试复制文件两次.因为第一个锁定了文件,第二个失败,因此构建失败.以下是显示正在发生的事情的日志文件片段:

When looking at the log file you can see that the build is trying to copy the file twice. Because the first one has a lock on the file, the second one fails and thus the build fails. Here is a snippet of the log file that shows what is happening:

2>_CopyFilesMarkedCopyLocal:将文件从D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll"复制到D:Builds"12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

5>_CopyFilesMarkedCopyLocal:将文件从D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll"复制到D:Builds"12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

2>_CopyFilesMarkedCopyLocal:将文件从D:Builds12FooCheck-In BuildSourcespackagesMvcContrib.Mvc3.FluentHtml-ci.3.0.96.0libMvcContrib.FluentHtml.dll"复制到D:Builds12FooCheck-In BuildBinariesMvcContrib.FluentHtml.dll".将文件从D:Builds12FooCheck-In BuildSourcespackagesRhinoMocks.3.6libRhino.Mocks.dll"复制到D:Builds12FooCheck-In Build"二进制文件Rhino.Mocks.dll".

2>_CopyFilesMarkedCopyLocal: Copying file from "D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll" to "D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

5>_CopyFilesMarkedCopyLocal: Copying file from "D:Builds12FooCheck-In BuildSourcespackagesCastle.Components.Validator.2.5.0libNET40Castle.Components.Validator.dll" to "D:Builds12FooCheck-In BuildBinariesCastle.Components.Validator.dll".

2>_CopyFilesMarkedCopyLocal: Copying file from "D:Builds12FooCheck-In BuildSourcespackagesMvcContrib.Mvc3.FluentHtml-ci.3.0.96.0libMvcContrib.FluentHtml.dll" to "D:Builds12FooCheck-In BuildBinariesMvcContrib.FluentHtml.dll". Copying file from "D:Builds12FooCheck-In BuildSourcespackagesRhinoMocks.3.6libRhino.Mocks.dll" to "D:Builds12FooCheck-In BuildBinariesRhino.Mocks.dll".

任何有关如何解决此问题的帮助将不胜感激.

Any help on how to fix this would be greatly appreciated.

推荐答案

看起来有两个项目在复制同一个文件.根据时间的不同,它们有时会同时发生,从而导致失败.您必须追溯节点 ID 才能找到源项目.请参阅 http://blogs.msdn.com/b/buckh/archive/2012/01/21/a-tool-to-find-duplicate-copies-in-a-build.aspx 了解更多细节和代码可能会为您找到它.

It looks like there are two projects copying the same file. Depending on the timing, they sometimes happen at the same time, resulting in the failure. You have to trace the node id back to find the source project. See http://blogs.msdn.com/b/buckh/archive/2012/01/21/a-tool-to-find-duplicate-copies-in-a-build.aspx for more details and code that may track it down for you.

这篇关于TFS 2012 构建“访问路径被拒绝"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆