[Mono-list] SLNToMake - embedded resources
Rodolfo Campero
rodolfocampero@hotmail.com
Mon, 06 Oct 2003 22:12:53 +0000
This is a multi-part message in MIME format.
------=_NextPart_000_ec1_7e2c_46cf
Content-Type: text/plain; format=flowed
Hi all,
Here is a modified version of Jarek's SLNToMake. Now it can handle embedded
resources.
I've also fixed a small bug, see the usage of System.IO.Path.Combine instead
of xxx + slash + yyy.
I hope you will find this helpful.
Cheers,
Rodolfo
_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
------=_NextPart_000_ec1_7e2c_46cf
Content-Type: application/octet-stream; name="slntomake.cs"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="slntomake.cs"
LyoKClRoaXMgZmlsZSBpcyBhIHBhcnQgb2YgU0xOVG9NYWtlLgoKQ29weXJp
Z2h0IChjKSAyMDAyLCAyMDAzIEphcm9zbGF3IEtvd2Fsc2tpIDxqYWFrQHBv
bGJveC5jb20+CkFsbCByaWdodHMgcmVzZXJ2ZWQuCgpSZWRpc3RyaWJ1dGlv
biBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9y
IHdpdGhvdXQgCm1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRl
ZCB0aGF0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9ucyAKYXJlIG1ldDoKCiog
UmVkaXN0cmlidXRpb25zIG9mIHNvdXJjZSBjb2RlIG11c3QgcmV0YWluIHRo
ZSBhYm92ZSBjb3B5cmlnaHQgbm90aWNlLCAKdGhpcyBsaXN0IG9mIGNvbmRp
dGlvbnMgYW5kIHRoZSBmb2xsb3dpbmcgZGlzY2xhaW1lci4gCgoqIFJlZGlz
dHJpYnV0aW9ucyBpbiBiaW5hcnkgZm9ybSBtdXN0IHJlcHJvZHVjZSB0aGUg
YWJvdmUgY29weXJpZ2h0IG5vdGljZSwKdGhpcyBsaXN0IG9mI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