Using embedded resources in Phalanger (Pure mode)

Discussion about the open-source Phalanger [?] project.

Using embedded resources in Phalanger (Pure mode)

Postby Jakub Misek » May 30th, 2012, 8:14 am

Jakub Misek │ DEVSENSE s.r.o. │ Email: jakub@devsense.com
User avatar
Jakub Misek
 
Posts: 2058
Joined: January 4th, 2012, 2:42 pm
Location: Prague

Re: Using embedded resources in Phalanger (Pure mode)

Postby MaitreDede » May 30th, 2012, 12:14 pm

Interesting :)
MaitreDede
 
Posts: 29
Joined: May 22nd, 2012, 7:17 am

Re: Using embedded resources in Phalanger (Pure mode)

Postby strfrank » May 31st, 2012, 7:35 am

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
strfrank
 
Posts: 20
Joined: May 30th, 2012, 5:05 pm

Re: Using embedded resources in Phalanger (Pure mode)

Postby weirdan » January 3rd, 2016, 7:37 pm

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.
weirdan
 
Posts: 17
Joined: June 4th, 2013, 1:11 am


Return to Phalanger project

Who is online

Users browsing this forum: No registered users and 1 guest

cron

User Control Panel

Login

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 62 on January 7th, 2012, 10:54 pm

Users browsing this forum: No registered users and 1 guest
Phalanger