What is AL.EXE and RESGEN.EXE
What is AL.EXE and RESGEN.EXE?
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
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, 6876👍, 0💬
Can each Java object keep track of all the threads that want to exclusively access to it?
Can Sub Procedure/Function Be Called Recursively? - Oracle DBA FAQ - Creating Your Own PL/SQL Proced...
How do you open an SSH connection to a remote box? ????
In below sample code if we create a object of class2 which constructor will fire first? Public Class...
Can Java object be locked down for exclusive use by a given thread? Yes. You can lock an object by p...