Search code examples
c#.netwpfresourcesembedded-resource

What's the difference between a Resource and an Embedded Resource in a C# application?


When should I use one or the other?

I'd like all of the files I use in my app (images, sound, xml file, etc.) to be inside of the .exe file so I don't deploy with a bunch of folders and files.

Thanks for the info.


Solution

  • “Resource” and “Content” build actions are to access the WPF resources using the Uris. However “Embedded Resource” is for prior technologies. However both options embed the resource in assembly but “Resource” option to be used for WPF.

    MSDN provides full explanation here.