Christoph Fink
Christoph Fink

Reputation: 23113

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

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.

Upvotes: 6

Views: 8756

Answers (2)

Jonast92
Jonast92

Reputation: 4967

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

Upvotes: 1

Jason Williams
Jason Williams

Reputation: 57952

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

Upvotes: 10

Related Questions