title: Working with embedded images in a shared project
body: <p>I want to add embedded images to my shared project (no PCL). I added the images to the shared project (not platform specific) as <em>Embedded resource</em>. I'm able to use the embedded images if I use the following:</p>
  
  <pre><code>ImageSource.FromResource("TestProject.Droid.Images.Document Folder.png")
  </code></pre>
  
  <p>Simply using the string</p>
  
  <blockquote>
    <p>ProjectNamespace.Subfolder.Filename.ext</p>
  </blockquote>
  
  <p>doesn't work as described by the <a href="https://developer.xamarin.com/guides/xamarin-forms/working-with/images/#Embedded_Images" rel="nofollow">docs</a>. One has to add the platform namespace (iOS, Droid, ...).</p>
  
  <p>Another option which did work is to edit <strong>.projitems</strong>. I added <strong>LogicalName</strong>:</p>
  
  <pre><code>&lt;ItemGroup&gt;
      &lt;EmbeddedResource Include="$(MSBuildThisFileDirectory)Images\Document Folder.png"&gt;
          &lt;LogicalName&gt;Document Folder.png&lt;/LogicalName&gt;
      &lt;/EmbeddedResource&gt;
  &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>but that isn't something which does work out of the box. There is no <a href="http://forums.xamarin.com/discussion/comment/57398/#Comment_57398" rel="nofollow">Resource ID</a>. I also tried looking into the <a href="https://github.com/xamarin/xamarin-forms-samples/blob/master/WorkingWithImages/WorkingWithImages/EmbeddedImages.cs" rel="nofollow">sample project</a>, but that doesn't start up at all.</p>
  
  <p>How can I use embedded images in my shared project?</p>