On Nov 17, 2012, at 10:55 AM, Spencer <[email protected]> wrote:
> My project has a number of XML files while are setup with the 'Embedded
> Resource' build action property. I'm trying to access the files using
> Assembly.GetExecutingAssembly().GetManifestResourceStream(fileName) but
> Assembly.GetExecutingAssembly() is returning null.
This should work. I suspect that what's happening is that the resource name
isn't your filename (very often the EmbeddedResource will have a namespace
prefix).
If you're on OS X you can verify this with `monodis`:
$ monodis --manifest *.dll
Manifestresource Table (1..1)
1: public 'Bxc8410.Resources.AboutResources.txt' at offset 0 in current
module
That was from setting the Build action for AboutResources.txt to
"EmbeddedResource"; note that it has a namespace + folder prefix, not just the
filename.
`ildasm` will also provide you the name of embedded resources.
> I've also tried setting the build action to 'Content' and access the files by
> opening them directly,
Content is not supported on Mono for Android.
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid