Re: Resources assemblys and csc.exe
- From: "dgauchet" <dgauchet@xxxxxxxxxxxxxxxxx>
- Date: Mon, 20 Jun 2005 10:28:00 +0200
Thanks Richard.
Effectively, I had to generate my .resources files using ResGen.exe (or
CFResGen.exe for compact applications) and to link these files in my
assembly using AL.exe
It works fine!!
Example:
CFResGen /compile A.resx B.resx
A.resources and B.resources were generated
AL /out:MyProject.dll /embed:A.resources,MyProject.A.resources
/embed:B.resources,MyProject.B.resources
MyProject.dll was created
Note that you need to add your project's name in the logical name of your
..resources files if you want to retrieve your resources at the running time.
D.
"Richard Grimes [MVP]" <read my sig> a écrit dans le message de news:
O4d1f0CdFHA.2076@xxxxxxxxxxxxxxxxxxxxxxx
> dgauchet wrote:
>> Hi all,
>>
>> I would build a resources assembly using csc.exe.
>> I launched :
>> csc.exe /out:MyDll.dll /target:library /res:.\..\Main.resx
>>>> it works.
>
> To use ResourceManager you have to compile the resx file and add that as a
> resource. What you have done is added the resx XML as a resource, and to
> read that you have to use Assembly.GetManifestResourceStream and then
> interpret the XML yourself. This is not too much of a problem because the
> data in the XML is usually text or a serialized object, but you have to
> know how to interpret it.
>
> Instead, I assume you want to add the resource and use ResourceManager,
> which will do the deserialization for you. To do that compile the resx
> file to a resources file using resgen. (This is a smart tool, it will
> compile .txt and .resx files to .resources files and decompile .resources
> files.)
>
> Here's a complete explanation of .NET resources:
>
> http://www.grimes.demon.co.uk/workshops/fusWSNine.htm
>
> Richard
> --
> www.richardgrimes.com
> my email evpuneqt@xxxxxxxx is encrypted with ROT13 (www.rot13.org)
>
>
.
- References:
- Resources assemblys and csc.exe
- From: dgauchet
- Re: Resources assemblys and csc.exe
- From: Richard Grimes [MVP]
- Resources assemblys and csc.exe
- Prev by Date: Re: VB.NET or VC++ ?
- Next by Date: IIS worker process is killed when I run my asp.net app
- Previous by thread: Re: Resources assemblys and csc.exe
- Next by thread: IIS worker process is killed when I run my asp.net app
- Index(es):
Relevant Pages
|