WPF - Image 'is not part of the project or its Build Action is not set to Resource'

Try doing a full rebuild, or delete the build files and then build the file.

Visual Studio doesn't always pick up changes to resources, and it can be a pain to get it recompile.

Also try using a full URI as that helped me when I had the same problem. Something like

pack://application:,,,/MyAssembly;component/bug.png

→ Right click the image file → Click property → Select Build Action to Resource → Clean and Build solution → Run the Solution

You will get the all.


I had the same issue. Cleaning and rebuilding the solution didn't fix it so I restarted visual studio and it did. Here's hoping Visual 2010 fixes this issue and the many others that plauge wpf in Visual 2008.