If you do not want it to be associated with the output folder additionally - you do not need to do anything. It is built into your exe, no need to check. It will always be true.
Ok, I understand, because you are dynamically creating the name of the embedded resource that you want to check.
See here: WPF - resource check exists without structured exception handling
They mostly check Assembly.GetExecutingAssembly().GetManifestResourceNames()
You can use this as a starting point. But keep in mind that the name of the resource is not images / myimage.png, but is built from your namespace, such as YourApp.images.myimage.png. You might want to take a look at the contents of the embedded resourceNames array from this answer.
source share