title: Visual Studio: How to store an image resource as an Embedded Resource?
body: <p>By default when you add an image (icon, bitmap, etc.) as a resource to your project, the image's <strong>Build Action</strong> is set to <strong>None</strong>. This is done because the image is magically stored inside a .resources file.</p>
  
  <p><strong><em>I</em></strong> want the resource to be stored as an embedded resource (my reasons are irrelevant, but let's just pretend it's so that I can see them inside <strong><a href="http://reflector.red-gate.com/" rel="nofollow noreferrer">RedGate's Reflector</a></strong>).</p>
  
  <p>So I changed each image's <strong>Build Action</strong> to <strong>Embedded Resource</strong>, and the resource then appears inside Lutz's Reflector - exactly as I want. </p>
  
  <p><strong>Unfortunately</strong>, <a href="http://msdn.microsoft.com/en-us/library/0c6xyb66(VS.80).aspx" rel="nofollow noreferrer">Microsoft says specifically not to do this</a>:</p>
  
  <blockquote>
    <p>Note that when the resource editor
    adds an image, it sets <strong>Build Action</strong> to
    <strong>None</strong>, because the .resx file
    references the image file. At build
    time, the image is pulled into the
    .resources file created out of the
    .resx file. The image can then easily
    be accessed via the strongly-typed
    class auto-generated for the .resx
    file. </p>
    
    <p>Therefore, you should not change
    this setting to <strong>Embedded Resource</strong>,
    because doing so would include the
    image twice in the assembly.</p>
  </blockquote>
  
  <p>So what is the <strong>proper way</strong> to include an image as an embedded resource?</p>