string resources

G

Guest

Can someone explain how to get a .resx file (containing simple string
resources) into an assembly? This must be such a common requirement but I
have failed to find a simple guide. I have used 'resgen' to generate a
..resources file, but what is this 'al.exe' referred to in the documentation,
how should it be used to make a .dll and where do I find al.exe, it isn't in
my installation of VisualStudio? Or is there a simple way from within Visual
Studio, without resorting to difficult command-line applications?
 
M

Markus Thurner

Hi,
Can someone explain how to get a .resx file (containing simple string
resources) into an assembly? This must be such a common requirement but I
have failed to find a simple guide. I have used 'resgen' to generate a
.resources file, but what is this 'al.exe' referred to in the documentation,
how should it be used to make a .dll and where do I find al.exe, it isn't in
my installation of VisualStudio? Or is there a simple way from within Visual
Studio, without resorting to difficult command-line applications?

resgen: you did it absolutely correctly, now move on with the al.exe,
which links the resource files into an assembly:


the al.exe is here (depending on your framework version):
c:\windows\Microsoft.NET\Framework\v1.1.4322\al.exe


To create language files, I normally have 1 .bat file for executing the
language files by a simple double click, and 1 .txt file for each
language, which is the configuration for the language:

* create_language.bat :
al @de.txt
al @fr.txt


and in de.txt/fr.txt (change culture and out-param for each language):
/t:lib
/embed:myresourcefile.resources
/culture:de
/out:../bin/Debug/de/MyProgramName.resources.dll
/template:../bin/Debug/MyProgramName.exe


note: you must compile the main .resource file (for me, it's mostly the
english language) with the .exe, which is the main program file.

hth
Markus
 
G

Guest

Thnaks Markus,

That has sorted it.
I was looking in VS for al.exe, not in .NET. So now I can see all the
command line options for it.
I didn't need the foreign language options (just the default resources),
since I am using a third-party tool for internationalization..
I'm still puzzled why there's no built-in tool (with VS) to do this common
operation!
 

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