'WPF image file cannot be found [duplicate]

My pictures are located inside /images folder, but the compiler wants them to be in the main folder even though the pictures are found and loaded in designer from images, so the path doesn't seem to be the issue. I've removed referralWhite from the main folder and the error "File cannot be found" persists.

The image is set to Resource and added to Resources.resx file. I've restarted VS, cleaned the solution and nothing seems to work even though it was fine prior to changing the pictures while redesigning the window.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source