views:

260

answers:

1

Hi, this is an extremely frustrating situation. We have just upgraded to Visual Studio 2010, and very nice it is, except for when it won't do something really simple, like Publish your ASP.NET Web Application to a folder on your desktop.

For some unearthly reason, what used to work flawlessly in 2008 is now generating an error: It stops Publishing, after successfully Building, saying:

Error: Copying file Images\Profile\32_32.JPG to 
  obj\x64\Release\Package\PackageTmp\Images\Prolfile\32_32.JPG failed. 
Could not find file 'Images\CelebrityProfileImages\32_32.JPG'.

The problem is that there isn't any reference to that file in the project code (in the database, yes, but not in the code itself), and we don't want to store such images with the project (and they're not).

Why (and how) has it suddenly decided that this unreferenced image (and presumably more if I get it to move past this one) is suddenly necessary to run the project? How can I stop this from happening?

Thanks for any help.

+4  A: 

I would open your CSProj file up in a text editor and see if you can find where that file is referenced. A simple text search will help. Either you will discover where it is hiding inside your project, or you can just delete it using the text editor.

Dave Markle
Agreed. It sounds like the .jpg is actually a file included as a project item.
p.campbell
Absolutely correct! Thanks so much!
Django Reinhardt
fixed up a similar problem I had with a renamed assembly - cheers
Luke Lowrey