Resources assemblys and csc.exe

D

dgauchet

Hi all,

I would build a resources assembly (no code, only resources) using csc.exe.
I launched :
csc.exe /out:MyDll.dll /target:library /res:.\..\Main.resources
or
csc.exe /out:MyDll.dll /target:library /res:.\..\Main.resx

but it doesn't work.

Is somebody knows if it's possible and, in this case, what I am doing wrong?


Thanks a lot.
 
M

Mattias Sjögren

I would build a resources assembly (no code, only resources) using csc.exe.

Use Al.exe for that instead.



Mattias
 
D

dgauchet

Thanks Mattias.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top