Using embedded resources in Phalanger (Pure mode)
4 posts
• Page 1 of 1
Using embedded resources in Phalanger (Pure mode)
Jakub Misek │ DEVSENSE s.r.o. | @misekjakub │ jakub@devsense.com │
-
Jakub Misek - Posts: 2092
- Joined: January 4th, 2012, 2:42 pm
- Location: Prague
Re: Using embedded resources in Phalanger (Pure mode)
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
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
- strfrank
- Posts: 20
- Joined: May 30th, 2012, 5:05 pm
Re: Using embedded resources in Phalanger (Pure mode)
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.
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.
- weirdan
- Posts: 17
- Joined: June 4th, 2013, 1:11 am
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 11 guests