Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is AL.EXE and RESGEN.EXE
What is AL.EXE and RESGEN.EXE?
✍: Guest
In the previous question you have seen how we can use resource files to store data according
to the localized languages. But when you actually go for deployment you will not like to
also install the “resx” or “txt” files. It’s definitely not a good deployment practice to install
data which can be easily modified. In short some how we should install this in a binary
format so that no end user can change it. That’s why Microsoft introduced satellite
assemblies.
Satellite assemblies are assemblies which do not contain source code. They only contain
resource files. You can create a satellite assembly using rsgen.exe and al.exe. They are in
binary DLL format which makes it easier to ship it during deployment. So finally during
deployment you do not need to ship the resx files but only the compiled satellite DLL.
The above diagram will give you a complete picture of how to generate Satellite assembly.
You can see from the above figure we need two exe resgen.exe and al.exe. Once you
made your resx file or text file you should first convert in to a “.resource” files. This is
done by using the resgen.exe. Below is the command snippet for resgen.exe where
LoginScreen.aspx.el.resx is the resx file and output is Greek.resources file. If you do not
provide the output file name it will generate “LoginScreen.resources”.
resgen LoginScreen.aspx.el.resx Greek.resources
You can also generate resx files from txt file using resgen.exe below is the code snippet for
the same:
resgen MyLanguage.txt MyLanguage.resx
The above command snippet will generate a MyLanguage.resx using MyLanguag.txt file.
You can make a DLL using resource files and not resx so you should make this conversion.
Now once the resource file is generated its time make the compiled assembly of the same
so that it can be shipped during deployment. This is accomplished by using the assembly
linker tool al.exe provided by Microsoft. Below is the command code snippet for the
same.
al.exe /out:el.dll /c:de /embed:greek.resources
In the /out switch you need to provide the output DLL name. /c you need to specify the
culture of the resource file. /embed you need to specify all the resources which are present
in the resource file. As said previously other than strings you can also put image files like
GIF, BMP etc. So those physical resources you can specify in the /embed switch. You can
specify more than one resource use “,” as a separator to specify more than one resource
files.
2007-11-01, 8126👍, 0💬
Popular Posts:
Advantages of a macro over a function? Macro gets to see the Compilation environment, so it can expa...
Describe in detail Basic of SAO architecture of Remoting? For these types of questions interviewer e...
What are the five levels in CMMI? There are five levels of the CMM. According to the SEI, Level 1 – ...
. How can a servlet refresh automatically if some new data has entered the database? You can use a c...
Can event’s have access modifiers ? Event’s are always public as they are meant to serve every one r...