Jb in a nutshell

Open Sourcier
posts - 66, comments - 11, trackbacks - 0

Why does not the framework thinks as me ?

Can someone tells me how it is possible to embed a file as a resource into an AssemblyBuilder at runtime ? I begin to think it is not possible.

Just a little note about the context. In Rail, we mount into memory an object graph of an assembly, readed by Mono.PEToolkit, and then, after some instrumentation, we emit it using System.Reflection.Emit. So, a resource for us is just a struct containing a string Name, another string FileName, a byte array for the Data, and a ResourceAttribute set to public or private.

The framework doc tells me that there is two ways to deal with resources. Let's take a look. The first one is calling DefineResource on an AssemblyBuilder or a ModuleBuilder. By doing it this way, you get an IResourceWriter, and then, you add Data to it. Why not, this seems pretty obvious. But, if you do it this way, the IResourceWriter is designed for .resources files, for strings localizations. When simply putting a byte array in it, with a name, and a public attribute, the IResourceWriter implementation will generates extra bytes, and make the resource (remember, a simple file) unreadable.

The next way (according to the doc), is to use the AddResourceFile method from an AssemblyBuilder. Let's try this way. First, it only wants a file on the HDD, no way to set a stream or something else. So I have to write my byte array of data on the disk, I call AddResourceFile, and once the assembly is builded, I delete temporary resources files. Wrong... The resource is only linked, not embedded. And THERE IS NO WAY TO SPECIFY HOW I WANT IT TO BE DONE.

I've looked how Mono mcs deals with resources. It's amazing ! They have to use Reflection on AssemblyBuilder to get a private method called EmbedResource. If the method is not found, it means that the runtime in used is not the Mono one, so it throw an error, Resources can only be embedded using Mono runtime. Sounds weird no ? Notice that it looks to be possible with the .net 2 framework using the DefineManifestResource method of ModuleBuilder, taking a string Name, a Stream of data, and attributes. Can't wait for the new version of the framework.

So I throw the sponge, as we say in France !
Die Wahrheit Ist Irgendwo Da Draussen

posted on lundi 27 septembre 2004 08:43

Feedback

# re: Why does not the framework thinks as me ?

http://www.heather-brooke-amatorvideo.toyt3.com ^^^ http://www.sexy-jenter-analsex.toyt3.com ^^^ http://www.assurdo-amatoriali-urinate.str0nz0.com ^^^ http://www.gradito-ragazze-spogliarello.str0nz0.com ^^^ http://www.lloronas-co-foto.100milfotos.com ^^^ http://www.catalog-minibikinis-playa.100milfotos.com ^^^ http://www.sesso-vecchie-porche.allievo69.com ^^^ http://www.handjob-desvirgues-gay.allievo69.com ^^^ http://www.nude-webcam.huor4.com ^^^ http://www.sympaattinen-beibit-masturbointi.huor4.com ^^^ http://www.heikko-sairaanhoitaja-koura.hu0ra.com ^^^ http://www.erikoinen-tytsyt-koura.hu0ra.com ^^^ http://www.sexy-shop.fott1.com ^^^ http://www.sexy-shop-cremona.fott1.com ^^^ http://www.matrix-code-screensaver.f0tti.com ^^^ http://www.fiera-dell-eros.f0tti.com ^^^ http://www.catalog-abuela-culona.asiaticas-putas.com ^^^ http://www.petarda-puta-catalog.asiaticas-putas.com ^^^ http://www.naken-man-perverssi.sexknulla.com ^^^ http://www.skit-smorja-fitta.sexknulla.com ^^^ http://www.istorien-free.corneo69.com ^^^ http://www.sesso-chicas-de-manizales.corneo69.com ^^^ http://www.super-tettone-sborrate.sessololiti.com ^^^ http://www.filmsex-pompini.sessololiti.com ^^^ http://www.mu-caracas-sexy.sesso-loliti.com ^^^ http://www.donne-mature-nane-sesso.sesso-loliti.com ^^^ http://www.sexy-mediamarkes.disponibile69.com ^^^ http://www.amichevole-segretaria-spogliarello.disponibile69.com ^^^ http://www.kuumempi-koulutytto-vittu.p1mpp1.com ^^^ http://www.ylaosaton-pelipaita-naken.p1mpp1.com ^^^ http://www.prophulaktiko-axiagapetos.ragazza69.com ^^^ http://www.masturbating-adriana-lima-con.ragazza69.com ^^^ http://www.viilea-lehmitytto-vittu.s3ksi.com ^^^ http://www.masturbating-laattaleevi-vapaa.s3ksi.com ^^^ http://www.friendly-cowgirl-prostituta.abbastanza69.com ^^^ http://www.prittiest-bionde-frode.abbastanza69.com ^^^ http://www.salvapantallas-guarros.latinas-putas.com ^^^ http://www.lingerie-jpg.latinas-putas.com ^^^ http://www.abuelas-putas-gratis.putasmorochas.com ^^^ http://www.interracial-girl.putasmorochas.com ^^^
17/11/2006 12:13 | LeVaN

# re: Why does not the framework thinks as me ?

http://www.bulma-nuda-trailer.vecchiecalde.com II http://www.bellezze-cubane-cuadros.vecchiecalde.com II http://www.dibujos-de-chicas-calatas-con-el-poto-al-aire.strettasesso.com II http://www.chicas-caseras-sexo.strettasesso.com II http://www.mpeg-twistys.sess0.net II http://www.hombres-sin-ropa.sess0.net II http://www.tone-porrnovell.seksi-fitta.com II http://www.tony-stigsson-gruppsex.seksi-fitta.com II http://www.facile-sesso-coppia.penissesso.com II http://www.clips-videos-tetazas.penissesso.com II http://www.fumetti-sexy-download.peniscaldo.com II http://www.bambine-inculate-movies.peniscaldo.com II http://www.giant-penis-mpeg.penis-kalu.com II http://www.naken-modell-peraaukon.penis-kalu.com II http://www.maksuton-dog-penis.matala-pimppi.com II http://www.slikke-mus.matala-pimppi.com II http://www.lesbisk-sot-klipp.kuvia-porno.com II http://www.naken-bryst-portrett.kuvia-porno.com II http://www.galerias-prelolitasex.freeclassicgay.com II http://www.orgamos-clip.freeclassicgay.com II http://www.virgin-vagina-video.fittaknull.com II http://www.syrjaanvetaytyva-tupla.fittaknull.com II
08/12/2006 09:11 | qwerty

# re: Why does not the framework thinks as me ?

http://succhio-il-cazzo.lhtsia4.info
http://nuda-gratis-vip.lhtsia4.info
http://puttanone-nere.lhtsoa4.info
http://maschi-con-cazzo-enorme.lhtsua4.info
http://video-porno-gratis-sadomaso-donna-incinta.lhtsaa4.info
http://sexi-shop-gela.lhtsya4.info
http://scambio-coppia-foto-annuncio.lhtsua4.info
http://scopata-giovane-ragazza-uomo-vecchio.lhtsia4.info
http://chat-sesso-gay.lhtsia4.info
http://fotografia-nudi-donna.lhtsua4.info
http://coppie-che-fanno-sesso.lhtsoa4.info
http://sesso-gay-video-gratis.lhtsia4.info
http://sesso-culo-fica.lhtsya4.info
http://foto-trans-brasiliano.lhtsya4.info
http://fumetto-sexi-gratis.lhtsya4.info
http://cazzo-figa-video.lhtsoa4.info
http://tettona-sicilia.lhtsua4.info
http://piede-maturo-collant.lhtsia4.info
http://filmati-sexi-privati-ed-amatoriali-gratuiti.lhtsaa4.info
http://grassa-figa-gratis.lhtsia4.info
11/02/2007 20:50 | dsadsa

# re: Why does not the framework thinks as me ?

http://www.vikipedi21.info/sixy-sexy.html schioccare scure http://www.xxx-spagnolette.kajajaj22.info calze foto pubblico http://www.reepen22.info/nylon-fotografia.html mama tanga http://www.mousy-asiatiche-dildo.fondelo22.info super inculatewerrp http://www.codardo-bere.kamibi21.info fa un pompino
27/02/2007 20:01 | Jok

# re: Why does not the framework thinks as me ?

http://www.chat-asiatiche.vasterka66.info doccia tatami http://www.osare-americano-sesso.aasterka66.info asiatiche calde gratis http://www.donne-grasse.casterka66.info video donne soldato http://www.schiavo-di-piedi.sasterka66.info private amatoriale http://www.wwwfilmati-porno-gratuiti.xasterka66.info lesbiche ubriache nellappartamento
http://www.zia-troia.casterka66.info sesso cicciona http://www.adeguato-cowgirl-dildo.aasterka66.info scoparsi la sorella http://www.vergini-liceali.vasterka66.info vanessa incotrada http://www.invisible-zoccoleborghesi-masturbate.sasterka66.info studentesse giovani sexy http://www.lesbo-fumetti.xasterka66.info cuttier diavolette urinate
07/04/2007 19:26 | ooo

# re: Why does not the framework thinks as me ?

http://www.che-sexy.ootyko86.info cloridi enormi http://www.figona-sexi.ootyko86.info inchiodare asiatiche scopata http://www.donne-mature-gals.gotyko86.info datemi la topabook http://www.foto-tenniste.gotyko86.info beautiful cameriera amore http://www.fotos-de-insestos.dotyko86.info infermiera pompino http://www.bionde-fighe.dotyko86.info intenso fighetta strip http://www.perizomi-donne.fotyko86.info deciso fighette fottilo http://www.ricce-troie.fotyko86.info chiappe sexi http://www.comico-momentaneo.agotyko86.info foto clisteri http://www.andrea-grassi.agotyko86.info mousy tedesco merda
29/04/2007 19:49 | www

# re: Why does not the framework thinks as me ?

http://www.latex-sex.feekojo86.info donne spogliate scopate http://www.ranma-nude.feekojo86.info bionde italiane http://www.amatoriale-titten.sseekojo86.info pornostar supertettone http://www.preposterous-lesbiche-fottilo.sseekojo86.info sborra amatoriale gratis http://www.massaggi-con-ingoio.geekojo86.info vagine pelose http://www.pornocon-anziani.geekojo86.info fantasticamente pulcino amore http://www.sex-bikini.deekojo86.info trailer video fighe http://www.puma-swede-swallow.deekojo86.info belle poppe video http://www.cerco-fidanzata.sweekojo86.info pompino negre http://www.videos-pornoestar-dee.sweekojo86.info stupefacente infermiera masturbate
17/05/2007 09:02 | www

# re: Why does not the framework thinks as me ?

http://www.pozycjonowanie.myszki.strefa.pl
17/05/2007 09:02 | www

# re: Why does not the framework thinks as me ?

http://www.e-wmm.pl windykacja
26/05/2007 18:51 | www

# re: Why does not the framework thinks as me ?

http://www.video-tettona.ftcepk04.info foto bionde galleria http://www.sesso-con-cinquantenni.ftcepk04.info segretarie tettone gratis http://www.nella-stanza-legare.izuqil04.info masturbare video http://www.pompini-da-cinquantenne.izuqil04.info filmati masturbazione femminile http://www.emotivo-amatoriali-diteggiatura.mleytl04.info piu caldo spogliarello http://www.sesso-sorella.mleytl04.info invisibile cowgirl dildo http://www.russe-calde.zblkhz04.info scopate perverse http://www.insignificante-anziane.zblkhz04.info fresco fine bellezze http://www.ero-ramazzotti.tnrhjz04.info scientifico orazio grassi http://www.tettona-annunci.tnrhjz04.info facial cumshot
10/07/2007 16:24 | WWW

# re: Why does not the framework thinks as me ?

http://www.dwmdj.cn/video-amatoriali-gratis-casalinghe-vogliose.html insesto gratiz http://www.dwmdj.cn/figa-leccata.html sony vaio hard disk esterno http://www.dwmdj.cn/scopate-e-pompini.html sfondo di natale gratis http://www.dwmdj.cn/mogli-foto.html web cam erotica http://www.dwmdj.cn/sheepish-fighette-masturbate.html video troie lesbiche http://www.dweki.cn/matura-scopata.html tardone pompini http://www.dweki.cn/immagini-zie-in-calore.html siti esibizioniste amatoriali http://www.dweki.cn/papaguerra.html bdsm 4 http://www.dweki.cn/foto-hot-di-figa.html immagini di vecchie che scopano i figli http://www.dweki.cn/lesbe-fotolog-putinhas.html siti pornovideo da scaricare gratis http://www.dwjkj.cn/molto-bollente-comprensivo-papy.html racconti erotici di mia sorella http://www.dwjkj.cn/foto-calze-autoreggenti.html cesti regalo gratis gratis on line http://www.dwjkj.cn/completamente-gratuito.html mignotte anziane http://www.dwjkj.cn/sexy-nudo-legale.html chiappe apertewerrp http://www.dwjkj.cn/gallerie-tg-mature.html siti amatoriali culi belli http://www.dwkru.cn/maialone-giapponesi.html sesso pornostar http://www.dwkru.cn/liceali-sborrate-erotica.html fine cameriera scopata http://www.dwkru.cn/maria-succhiami-il-pene.html claire keim sexy http://www.dwkru.cn/preeten-hard.html schioccare fighetta gruppo http://www.dwkru.cn/lovette.html crave bellerosse urinate http://www.dxyxh.cn/deciso-cameriera-masturbate.html belle troie porcellone http://www.dxyxh.cn/sexcepire-ragazze.html mamme sfondate http://www.dxyxh.cn/pompini-chicas-cojidas.html nicer bionde sex http://www.dxyxh.cn/immagini-the-sleepover.html insegnante sexy gratis http://www.dxyxh.cn/diciottenni-troie.html ragazze ceche xxx
25/08/2007 18:45 | WWW

# re: Why does not the framework thinks as me ?

http://www.firif.cn/foto-giovani-pompinare.html foto di bellissimi culi inculati http://www.firif.cn/foto-gratis-di-bei-seni.html planet shemale http://www.firif.cn/foto-gratis-donne.html che tette http://www.firif.cn/foto-gratis-poppe-enormi.html ridicolo fighetta strip http://www.firif.cn/foto-gratis-vagine-mature.html prezzi box doccia http://www.fkfsu.cn/foto-gratis-asiatiche.html grassone anziane pompini http://www.fkfsu.cn/foto-gratis-di-puttane.html segretari che scopano http://www.fkfsu.cn/foto-gratis-maschi-nudi.html ultrapasswords http://www.fkfsu.cn/foto-gratis-supertettone.html trenta ore per la topa http://www.fkfsu.cn/foto-grtis-cinquantenni-vogliose.html ragazzi 20che 20scopano http://www.krdck.cn/foto-gratis-belle-vergini.html foto lecca piedi http://www.krdck.cn/foto-gratis-di-sborrate-transessuali.html russe vergini http://www.krdck.cn/foto-gratis-masturbazione-femminile.html comico americano pompino http://www.krdck.cn/foto-gratis-tardone.html todo tipo http://www.krdck.cn/foto-grtis-di-fica.html schemales video sex http://www.reusd.cn/foto-gratis-cazzoni-sborranti.html piedini diciottenni http://www.reusd.cn/foto-gratis-di-uomini-nudi.html gallerie foto mestruo http://www.reusd.cn/foto-gratis-orge.html barzellette nuove http://www.reusd.cn/foto-gratis-troia-tettone.html video coppie sposate porno http://www.reusd.cn/foto-hard-casalinghe.html annunci orsi maturi http://www.rwkre.cn/foto-ilona-staller-nuda.html donne nere maggiorate http://www.rwkre.cn/foto-le-donne-piu-bone.html amore lesbiche azione http://www.rwkre.cn/foto-liceali-sexy.html avventure erotiche http://www.rwkre.cn/foto-maschi-nudi-erotismo.html siti foto lesbiche gratis http://www.rwkre.cn/foto-modelli-nudi.html sexi shop online
29/08/2007 12:00 | WWW

# re: Why does not the framework thinks as me ?

http://www.sculacciate-immagini.rfker01.info asino gallery http://www.foto-fica-vergine.rfker01.info videoclip bulma http://www.ftvgirls-kate.rfker01.info immagini cloridi grossi http://www.belle-tetton.ylslf01.info foto erotice http://www.gradito-tedesco-spogliarello.ylslf01.info scopare succhiacazzi http://www.pleasant-soldato-inculate.ylslf01.info sexeo spogliarelli http://www.michel-unzicher.qtbka01.info gambe e collant http://www.selen-che-scopa.qtbka01.info webchat erotiche http://www.cam-in-schemale.qtbka01.info esibizionisti con foto http://www.scopate-a-novanta.yznnm01.info immagini di cazzi http://www.femmine-tardone.yznnm01.info anjelina anale http://www.bukkake-selvaggio.yznnm01.info incontri sadomaso
30/08/2007 00:06 | WWW

# re: Why does not the framework thinks as me ?

http://www.kata-mutiara.hmdhmn05.info video spogliarelli maschili http://www.ciuccia-cazzo.hmdhmn05.info sexy fidanzate http://www.racconti-scambio.hmdhmn05.info nonne grasse http://www.cubane-pallavoliste.qubxjn05.info gole vogliose fotografie http://www.brutte-negre.qubxjn05.info sorche sfondate http://www.mamme-sporcaccione.qubxjn05.info anziane vogliose nude http://www.fighe-giovani-video.pglfpp05.info vecchie casalinghe pelose http://www.grasse-pompini.pglfpp05.info zie troie foto http://www.anziane-grasse-gratis.pglfpp05.info fotogallery tette gratis http://www.porno-sexy-ranma.nsskox05.info coppie campane http://www.culi-perfetti.nsskox05.info sauna nudi com http://www.piedi-maschili-belli.nsskox05.info calore donne
26/10/2007 23:25 | WWW

# re: Why does not the framework thinks as me ?

http://www.mamma-coscie-aperte.pyrduz05.info sauna donna sesso http://www.foto-incinte-sborrate.pyrduz05.info sesso con vecchie http://www.amatoriale-tette.dpxtjy05.info figa di vacca http://www.corpi-sexi.dpxtjy05.info enormi seni gratis http://www.pompini-cognata.nldppb05.info immaggini segretarie sexy http://www.scopate-diciottenni.nldppb05.info sporcaccione gratis http://www.cubane-tettone.yjzilu05.info fica ragazze brutte http://www.clitoridi-caldi.yjzilu05.info eva hengel scopa N
04/11/2007 15:25 | bellezze-nude@nldppb05.info

# re: Why does not the framework thinks as me ?

http://www.signore-mature-grosse.cecjid.cn gradito fighetta sex http://www.gambe-da-sballo.cecjid.cn pancaadinversione http://www.sessualita-nella-donna-matura.cecjid.cn mature magre http://www.suore-maiale.cecjid.cn foto ragazze che pisciano http://www.sconfinato-cyber.cecjid.cn attrici che trombano http://www.natalia-rubber-movie.2kmk2.cn clipfighebagnate http://www.doppiatori-cartoni-animati.2kmk2.cn tutto gratis viados nudi http://www.worldsex.2kmk2.cn donna tettona matura http://www.pagliaio.2kmk2.cn attraente segretaria sesso http://www.coppia-brescia-gang-bang-matura.2kmk2.cn foto piedi segretarie http://www.giubbottibrema.cnjncj.cn uominigrassicazzo http://www.cartoline-erotiche-porno.cnjncj.cn video troie gratis http://www.multisala-medusa-livorno.cnjncj.cn superfighegratis http://www.racconti-pornogay-free.cnjncj.cn striptease doccia http://www.provini-per-film-eros.cnjncj.cn mousey fighetta azione http://www.grandi-fiche-pelose.cdwlwdk.cn abrianna vids http://www.foto-penetrazione.cdwlwdk.cn pisseuse en collants http://www.croatian-pop-star-porn-video.cdwlwdk.cn deciso castra http://www.ortodonzia-invisibile.cdwlwdk.cn sexverhalen sylvia yvette http://www.cute-ass.cdwlwdk.cn residence orion http://www.naturale-boobs.cskfuf.cn film erotici gratuidi http://www.film-erotici-gratuidi.cskfuf.cn oops accidentali http://www.upskirtamatorialiitaliani.cskfuf.cn clisteri punizioni donne http://www.scopateninfomanipompebocche.cskfuf.cn video culi militari http://www.scopatedigruppo.cskfuf.cn more focose
08/11/2007 09:51 | WWW

# re: Why does not the framework thinks as me ?

http://www.brasiliane-enni.jklfziw7.info gnocche grasse http://www.video-scopate-anteprima.jklfziw7.info scopano moglie http://www.fighe-da-fottere.awawriw7.info piedi donne bellissime http://www.pompino-mamma.awawriw7.info tettone maiale http://www.fiche-rasate-amatoriali.ewwtfzj7.info belle pupe http://www.culoni-grossi-maturi.ewwtfzj7.info minchie sborrate http://www.foto-piedi-sborrati.pzwkdou7.info sexi svedesi http://www.belle-tope-nude.pzwkdou7.info fica nera gratis
27/11/2007 15:23 | mature-tedesche@pzwkdou7.info

# re: Why does not the framework thinks as me ?

http://www.avi-falda.qzproln7.info sexo mujer gorda http://www.latin-chat-sexo.qzproln7.info clips cristian infiel http://www.movies-bellas-chicas.niikbwx7.info avi cartoon ne http://www.foto-transexuales-asiaticas.niikbwx7.info sexo oral gratis http://www.sexo-putitas-follando.wfjyhkq7.info morbosos com dvd http://www.enanas-calientes-foto.wfjyhkq7.info maridos cornudos clips http://www.sexo-japonesa-sms.yxpmclm7.info sexo madura fea http://www.contactos-lesvianas-galeria.yxpmclm7.info madura jovencito dvd xx ?N

# re: Why does not the framework thinks as me ?

http://www.sexe-branler-homme.ciastka-las.pl faire masturber fille http://www.homo-suce.ciastka-las.pl garce bitch http://www.sexe-americain-gratuit.ciastka-las.pl recherche chatte http://www.annonces-gratuite-sexe-sur-caen.resistant.pl photo sexe gratuit http://www.suce-mec.resistant.pl raie cul skyblog http://www.blog-sein-sexe.resistant.pl plan sexe toulouse
21/01/2008 00:51 | WWW

# re: Why does not the framework thinks as me ?

http://www.beauty-segretaria-azione.difofh06.info fiche pelose mature http://www.cameriere-tettone.difofh06.info tette friuli http://www.pps-masturbazione.spwbqj06.info immagini guardoni http://www.discreto-lesbiche-sesso.spwbqj06.info famouse pornostar http://www.video-seni.ppjyyg06.info liceali sverginate http://www.attraente-fighette-azione.ppjyyg06.info donne con perizzoma http://www.amiable-operaio-ubriache.xlzjou06.info cuttiest bionde masturbate http://www.scopate-con-ragazze-grasse.xlzjou06.info fotoannunci coppia

Post Feedback

Title:
Name:
Url:
Comments: 
Enter the code you see: