title: How to access resources in a .net class library from web request
body: <p>Setup:
  I have a .net 4.5 class library that embeds resources (e.g., images) for reuse by other ASP.NET MVC projects.  For example, the class library (named BlockTypesLibrary) has the following path:</p>
  
  <ul>
  <li>BlockTypesLibrary (project)
  <ul>
  <li>Static
  <ul>
  <li>img
  <ul>
  <li>Block.png</li>
  </ul></li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>I set the properties of Block.png to be Build Action == "Embedded Resource" and Copy Type to Output Directory == "Do Not Copy".</p>
  
  <p>Now in my MVC project I reference the BlockTypesLibrary.dll and I using Reflector I see the resources listed ok:</p>
  
  <ul>
  <li>BlockTypesLibrary
  <ul>
  <li>BlockTypesLibrary.dll</li>
  <li>Resources
  <ul>
  <li>BlockTypesLibrary.Static.img.Block.png</li>
  </ul></li>
  </ul></li>
  </ul>
  
  <p>In the template I have tried to access that resource in many different ways but can't.  For example:</p>
  
  <pre><code>  &lt;div &gt;
      &lt;img src="~/BlockTypesLibrary.Static.img.Block.png" alt="Block"&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>Any ideas how to make this work?  I also need to include .cshtml templates as resources in the class library.</p>