title: Assembly.GetManifestResourceStream not working with Xamarin on iOS
body: <p>The following code works fine in Windows, however, when using Xamarin and targeting iOS, GetManifestResourceStream() returns null.</p>
  
  <pre><code>Assembly assembly = Assembly.GetExecutingAssembly();
  Stream stream = assembly.GetManifestResourceStream("CommunicationModel.XmlSchemas.DeviceCommon.xsd");
  </code></pre>
  
  <p>I have set the file 'DeviceCommon.xsd' as an Embedded Resource.  Not sure why it is not returning a valid stream.</p>
  
  <p>Does anybody know why this is not working in iOS using Xamarin?</p>
  
  <p><em><strong>UPDATE:</em></strong></p>
  
  <p>Ok, so I followed the advice in the comments and set the file to Content.</p>
  
  <p>I can now detect the file, but cannot open it:</p>
  
  <pre><code>if (File.Exists("DeviceCommon.xsd"))
  {
    try
    {
      myStream = new FileStream("DeviceCommon.xsd", FileMode.Open);
    }
  ....
  }
  </code></pre>
  
  <p>When I run the above code, the 'File.Exists()' call works, but when I attempt to open it, I get the following exception:   </p>
  
  <pre><code>Access to the path "/private/var/mobile/Applications/8BD48D1F-F8E8-4A80-A446-F807C6728805/UpnpUI_iOS.app/DeviceCommon.xsd" is denied.
  </code></pre>
  
  <p>Anybody have some ideas how I can fix this???</p>
  
  <p>Thanks,
  Curtis</p>