title: C# - Sharing resources file between project
body: <p>I would like two how to do to share Resources files between 2 (or more) projects?</p>
  
  <p>So, to resume, I've three project :</p>
  
  <p>the development project (CF.NET) that include the resource file (with all definition).</p>
  
  <p>I've two other projects that are empty BUT linking to the development projects, it's just a different build each time, so when I modify the development project, all three projects are updated too. (Modification of the csproj file.)</p>
  
  <p>Question is, what about Resources files? When I try to access from the development project I get all resources but when I try from the 2 others, it throws an "MissingManifestResourceException".</p>
  
  <p>Any idea how to solve this issue?</p>
  
  <p>Thanks.</p>
  
  <hr>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>Here is what I've done :</p>
  
  <p>Create a project named "RealProject" which contains all code (including resources files)
  Create a project named "LinkedProject" which contains nothing (I deleted all files into it and modify the csproj file as the following :</p>
  
  <pre><code>  &lt;ItemGroup&gt;
      &lt;Compile Include="..\RealProject\**\*.cs" /&gt;
    &lt;/ItemGroup&gt;
  </code></pre>
  
  <p>So in LinkedProject directory I've only :</p>
  
  <ul>
  <li>[Directory] bin</li>
  <li>[Directory] obj</li>
  <li>[File     ] LinkedProject.csproj</li>
  </ul>
  
  <p>The whole LinkedProject uses the RealProject files, it's just a different configuration build (see here to know why : <a href="https://stackoverflow.com/questions/5109026/c-code-compiler-for-net-cf-net/">C# - Code compiler for .NET &amp; CF.NET</a> )</p>
  
  <p>Once in that configuration, I've no access to the resources files from the RealProject ...</p>
  
  <p>If you need screens or more detailed explanation, just ask.</p>
  
  <hr>
  
  <p><strong>[EDIT]</strong></p>
  
  <p>With this code, it works, Resource manager isn't loaded on the good Assembly name, but it should exists a better solution !!!</p>
  
  <pre><code>Assembly ass = Assembly.ReflectionOnlyLoadFrom(@"..\..\..\RealProject\bin\Debug\RealProject.dll");
  ResourceManager manager = new ResourceManager("RealProject.Properties.Resources", ass);
  </code></pre>
  
  <hr>
  
  <p><strong>[Solution]</strong></p>
  
  <p>Things to check :</p>
  
  <ul>
  <li>The LinkedProject as the same
  namespace as the RealProject </li>
  <li>Add Resources as links</li>
  <li>Clean up all your solution</li>
  <li>Rebuild it</li>
  </ul>
  
  <p>Test ! </p>