title: Xamarin.Forms + .resx string resources - System.IO.FileNotFoundException: Invalid Image
body: <p>I am creating a Xamarin.Forms app based on a C# shared code project and another two projects for the actual Android + iOS app. </p>
  
  <p>I now want to implement string localization like it is documented <a href="https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/localization/text?tabs=windows" rel="noreferrer">here</a>. So I created a .net standard 2.0 library project in my solution for the .resx file and referenced this project in my two main projects, and I did all the other steps described in the linked article, of course.</p>
  
  <p>When I now want to access any of my string resources from one of my app projects, <code>ResourceManager.GetString</code> throws this Exception: <code>System.IO.FileNotFoundException: Invalid Image</code></p>
  
  <p>Example code would be that line, but it can be also any other string resource.</p>
  
  <pre><code>public static string global_copyright {
      get {
          return ResourceManager.GetString("global_copyright", resourceCulture);
      }
  }
  </code></pre>
  
  <p>I can confirm that the assembly of this library project is found and loaded correctly, since I can create instances of other classes defined in that project.</p>
  
  <p>Now I put this code directly at the beginning of the App() constructor like it is described in that article to debug for such issues:</p>
  
  <pre><code>var assembly = typeof(AppResources).GetTypeInfo().Assembly;
  foreach (var res in assembly.GetManifestResourceNames())
  {
      System.Diagnostics.Debug.WriteLine("found resource: " + res);
  }
  
  var test = AppResources.global_copyright;
  </code></pre>
  
  <p>The first lines are executed fine and it shows me that one resource file is found in that assembly. Its name is also correct. But on the last line it crashes with that exception.
  What did I wrong? Why is ResourceManager not able to load string resources from that assembly?</p>
  
  <p>Visual Studio 2017 (15.9.6) with Xamarin.Forms v3.4</p>