TFS Build fails with “Could not copy file” of file not even in the project

ε祈祈猫儿з 提交于 2019-12-10 13:48:43

问题


I have TFS Build set up, which worked fine until yesterday. Since then I get the following error from one project:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "Content\themes\base\images\ui-bg_flat_0_aaaaaa_40x100.png" because it was not found.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "Content\themes\base\images\ui-bg_flat_75_ffffff_40x100.png" because it was not found. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "Content\themes\base\images\ui-bg_glass_55_fbf9ee_1x400.png" because it was not found.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\WebApplications\Microsoft.WebApplication.targets (182): Could not copy the file "Content\themes\base\images\ui-bg_glass_65_ffffff_1x400.png" because it was not found. C:\Program Files

...and about 10 more...

The files mentioned by the error are nowhere to be found, not in the project nor in any folder of the project.

Does anyone know how to get rid of this error?

At Ln 182 of the .target file is the following:

<Copy SourceFiles="@(Content)" Condition="'%(Content.Link)' == ''"
DestinationFolder="$(WebProjectOutputDir)\%(Content.RelativeDir)" 
SkipUnchangedFiles="true" 
Retries="$(CopyRetryCount)"
RetryDelayMilliseconds="$(CopyRetryDelayMilliseconds)" />

I also have a second project in the solution which is nearly the same and builds fine.


回答1:


Grep/Search the entire source tree for those filenames - something must be referencing them.




回答2:


Adding the missing files to source control solved the problem for me.



来源:https://stackoverflow.com/questions/15623667/tfs-build-fails-with-could-not-copy-file-of-file-not-even-in-the-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!