Neil Knight
Neil Knight

Reputation: 48537

MVC2 publish failing due to image that was removed

I have recently tried to deploy my MVC2 application and have had great success in the past. Now, I have removed an image that was no longer needed and I'm no longer able to publish the application. I keep getting:

Error 54 Copying file Images\xxx.jpg to obj\Debug\Package\PackageTmp\Images\xxx.jpg failed. Could not find file 'Images\xxx.jpg'.

How do I get rid of this error so I can publish my application again?

Upvotes: 1

Views: 487

Answers (3)

Barrie Reader
Barrie Reader

Reputation: 10715

Ah hah! A question I can answer!

I would make sure that any references to the file(s) in question are removed from the project.

i.e.
If you see any files that have an exclamation mark next to it, exclude these from the project.

Upvotes: 1

Simon Hazelton
Simon Hazelton

Reputation: 1255

Is there a reference to it in the project file?

Unload your project (right click on the project -> Unload Project)

Edit the project (right click on the project -> Edit Project)

Search for the image name in the project XML file.

Upvotes: 0

Gregory A Beamer
Gregory A Beamer

Reputation: 17010

Installer? If so, that is where the reference to the image is. You can either rebuild the output of the package (delete and reset) or manually prune the reference.

Upvotes: 0

Related Questions