Bug 13830 - GetMainifestResourceStream(..) returns null when using Embedded Resource
Summary: GetMainifestResourceStream(..) returns null when using Embedded Resource
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 0.x Insider Preview
Hardware: Other Other
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-08-07 15:35 UTC by Curtis
Modified: 2016-12-22 17:13 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Curtis 2013-08-07 15:35:45 UTC
The following code works just fine when compiling for Windows.  However, when I compile for an iOS device, GetMainifestResourceStream() always returns null.  I have added the 4 files below to my project as 'Embedded Resource' and 'Do Not Copy'.  GetManifestResourceStream returns null when running on my iPad device:


                Assembly assembly = Assembly.GetExecutingAssembly();

                List<Stream> streams = new List<Stream>
                {
                    assembly.GetManifestResourceStream("EtudeCommunication.XmlSchemas.DeviceCommon.xsd"),
                    assembly.GetManifestResourceStream("EtudeCommunication.XmlSchemas.DeviceCommon_Set.xsd"),
                    assembly.GetManifestResourceStream("EtudeCommunication.XmlSchemas.DeviceDirectory.xsd"),
                    assembly.GetManifestResourceStream("EtudeCommunication.XmlSchemas.Root.xsd")
                };
Comment 1 Bo Pang 2013-10-07 15:54:01 UTC
I tried to use the GetManifestResourceStreammethod on my iphone device to load an txt file as the 'Embedded Resource' and it works for me.

Could you please tried it on the latest build and if the issue is still there, could you provide a small test case.

Thanks!
Comment 2 Ian Ceicys 2015-07-21 10:29:55 UTC
Hello Bo, I am following up on this bug and attempting to reproduce the
issue with the latest stable build of our Xamarin Visual Studio product
(3.11.666) and so far I have been unable to reproduce the issue and can load an embedded resource on an iPhone successfully.

http://developer.xamarin.com/releases/vs/xamarin.vs_3/xamarin.vs_3.11/ 

Please try to upgrade to the latest stable XVS build and if you are still
experiencing the same problem please reply and I'd be more than happy to setup
a screen sharing session to debug the issue.

Also, if possible can you please include your solution file / project file assets so I can more easily reproduce the issue in our environments.
Comment 3 Jose Gallardo 2016-12-22 17:13:21 UTC
Marking as resolved not_reproducible.
Please feel free to reopen the issue if you can still reproduce it with current bits.
Thanks!