title: create resource file programmatically
body: <p>I'd like to create a resource file (in the process of preparing for deployment), filling it with certain settings (big XML structure) and some texts but I'm not sure how to go about doing that.</p>
  
  <p>I did find some examples using <code>ResXResourceWriter</code> but when trying to open it cannot find the resource-key. Here's what I have so far :</p>
  
  <pre><code>private void simpleButton1_Click(object sender, EventArgs e)
  {
      using (System.IO.MemoryStream oStream = new System.IO.MemoryStream())
      {
          this.layoutControl1.SaveLayoutToStream(oStream);
          using (ResXResourceWriter oWriter = new ResXResourceWriter(@"..\..\Properties\LayoutControl.resources.Resx"))
          {
              oWriter.AddResource("one", oStream.GetBuffer());
              oWriter.Generate();
              oWriter.Close();
          }
      }
  
  }
  
  private void simpleButton2_Click(object sender, EventArgs e)
  {
      ResourceManager rm = new ResourceManager("WindowsFormsApplication1.LayoutControl", Assembly.GetExecutingAssembly());
      var one = rm.GetObject("one");
      Console.WriteLine("");
  }
  </code></pre>
  
  <p>I create the resource by clicking <code>simpleButton1</code>, I then stop the app, do an add-existing-item into my project, recompile and click <code>simpleButton2</code>, then I get a </p>
  
  <blockquote>
    <p>MissingManifestResourceException (Could not find any resources appropriate for the specified culture or the neutral culture.  Make sure "WindowsFormsApplication1.LayoutControl.resources" was correctly embedded or linked into assembly "WindowsFormsApplication1" at compile time, or that all the satellite assemblies required are loadable and fully signed.)</p>
  </blockquote>
  
  <p>Can someone give me some pointers or better yet, a working example? And I would prefer it if the resource would compile into a 'seperate' assembly like 'normal' resource files.</p>