Re: Using embedded resources in Phalanger (Pure mode)
Posted:
May 31st, 2012, 7:35 am
by strfrank
Hi,
I'm the user who posted the question on stackoverflow.
Did you see my reply? When I try to get the resource content (a txt file) I get a lot of extra bytes at the beginning of the stream, including some text that says "System.Resources.ResourceReader...".
For now I resolved by simply cutting off the initial bytes, but maybe this is a bug, I wrote the same code in c# and didn't get those bytes.
Many thanks
Re: Using embedded resources in Phalanger (Pure mode)
Posted:
January 3rd, 2016, 7:37 pm
by weirdan
Answered at stackoverflow (yes, I know, this is old but still useful).
Jakub, I think you should use DefineManifestResource() instead of DefineResource() for unrecognized files. It will mimic c# compiler behavior and let people use the code from c# tutorials. And the requirement for both alternative and original resource names certainly looks like a bug to me.
Alternatively, there may be another switch to provide manifest resources if you want to keep current behavior of /res: switch.