-1

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.

Anja
  • 9
  • 3
  • Do you copy the files to your build when building the app? (Check the propertys of your files in the project explorer and change the `Copy to Output Directory` to `Copy aways` or `Copy if newer`.) – Felix May 24 '22 at 10:53
  • 1
    @Felix That is not necessary, and not recommended. A WPF application would typically load images from assembly resource files, i.e. image files that are compiled into the assembly by means of the Build Action *Resource* and loaded by a Resource File Pack URI. – Clemens May 24 '22 at 10:55
  • @Felix no, they're set to Do Not Copy – Anja May 24 '22 at 11:03
  • @Anja, just ignore my comment. As Clements said, copyig the files is aparently not what you want to do. – Felix May 24 '22 at 11:40

0 Answers0