[英]TFS build Error Microsoft.WebApplication.targets" was not found, while file exists. Sometimes build is success
I am using TFS 2013 to build my project but sometimes I am getting the error as: 我正在使用TFS 2013来构建我的项目,但有时会出现以下错误:
The imported project "C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\WebApplications\\Microsoft.WebApplication.targets" was not found.Confirm that the path in the declaration is correct, and that the file exists on disk.
找不到导入的项目“ C:\\ Program Files(x86)\\ MSBuild \\ Microsoft \\ VisualStudio \\ v12.0 \\ WebApplications \\ Microsoft.WebApplication.targets”。确认声明中的路径正确,并且该文件存在在磁盘上。
I have gone through many answers and found a lot of workaround to fix it but “in my case the problem is that sometime my build is success and sometimes it is failing.” 我经历了很多答案,并找到了许多解决方法来解决它,但“就我而言,问题是我的构建有时会成功,有时会失败。”
Let say I am running my build for 10 times then 3-4 times it is passing and 6-7 times it is giving error. 假设我运行我的构建10次,然后通过3-4次,给出错误6-7次。
I have checked the path on server and the file 我已经检查了服务器和文件上的路径
"C:\\Program Files (x86)\\MSBuild\\Microsoft\\VisualStudio\\v12.0\\WebApplications\\Microsoft.WebApplication.targets"
“ C:\\ Program Files(x86)\\ MSBuild \\ Microsoft \\ VisualStudio \\ v12.0 \\ WebApplications \\ Microsoft.WebApplication.targets”
exists at the same location where TFS build is looking for. 存在于TFS构建所需的同一位置。
I have also visited the link 我也访问了链接
TFS build errors a file not found, while file exists TFS构建错误,但文件存在时找不到文件
but there is no answer provided on this thread. 但是此线程上没有提供答案。
I want to do very minimal changes. 我想做很小的改动。 Please suggest what would be the possible solution to make .targets file always available.
请提出使.targets文件始终可用的可行解决方案。
Update: 更新:
I have found a similar question at the link 我在链接上找到了类似的问题
TFS Build missing .targets files intermittently TFS间歇性地生成丢失的.targets文件
but the answer provided at this thread does not solve my problem and even if it's a kind of question again not the solution that's why I have started a separate thread. 但是此线程提供的答案不能解决我的问题,即使这又是一种问题,也不是解决方案,这就是为什么我启动了一个单独的线程。
You may try the items below: 您可以尝试以下项目:
C:\\Users\\username\\AppData\\Local\\Microsoft\\Team Foundation\\5.0\\Cache
. C:\\Users\\username\\AppData\\Local\\Microsoft\\Team Foundation\\5.0\\Cache
。 C:\\Program Files\\Microsoft Team Foundation Server 12.0\\Application Tier\\Web Services\\_tfs_data
C:\\Program Files\\Microsoft Team Foundation Server 12.0\\Application Tier\\Web Services\\_tfs_data
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.