Accessing files using Build Action: Content

Narf the Mouse picture Narf the Mouse · Jun 8, 2012 · Viewed 8.8k times · Source

The way I've previously accessed content files is by setting them to "Copy always/if newer", then loading the file directly.

However, browsing the web, it seems there's another way to load it - That it's automatically included in the .exe/.dll. However, I've been unable to find out what the method is, to access said included content.

Answer

Daniel A. White picture Daniel A. White · Jun 8, 2012

It is Embedded Resource. This will cause it to be streamed into your assembly.

Here is Microsoft's walk thru: http://support.microsoft.com/kb/319292