Re: Resources assemblys and csc.exe

Tech-Archive recommends: Fix windows errors by optimizing your registry



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)
>
>


.



Relevant Pages

  • Re: Is this scenario possible?
    ... I'm planning on using the xml in Resources as a 'template', just load it and change values. ... Dim xDoc As New XmlDocument ... That should be possible by using a custom implementation of XmlResolver that ensures that the system identifier is resolved by loading the DTD from the resource. ...
    (microsoft.public.dotnet.xml)
  • Re: Peristent Data - Registry, Settings
    ... Here is some xml help. ... you should be much more famaliar with serializing custom ... Registry, Settings and Resources ... You should not use resources for this. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: what is wrong the following code?
    ... It's XML, so you can't just append at the end -- but since XML is an open ... don't know the format. ... file until you hit the end, then write out your new resources. ... It seems unlikely to me that you'd run into memory problems ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: representing relationship graphs on the web
    ... Please send me any ideas and links to resources ...
    (comp.programming)
  • Re: puzzling Mach-O error
    ... I'd previously begun to try to convert my PPob ... resources into xml using MetroWerk's tool, ...
    (comp.sys.mac.programmer.codewarrior)