What do you mean by Satellite Assembly in .NET?

You might be using resource files in your project. During deployment, it is not recommended to deploy resource files directly. Instead if you could convert it into an intermediate form which doesn’t include any source code then that will be the best practice to proceed with. This is achieved using satellite assemblies in .NET.

The resource files can either be of .txt extension or .resx extension. To convert these files into a Binary DLL file belonging to satellite assembly, you have to use two executables which are mentioned below:
• resgen.exe: This executable is used to convert resource files of extension .txt or .resx into files of extension .resources. Only files of .resources extension can be converted into binary DLL. This executable is also used to convert .txt files into .resx files.
• al.exe: This executable accepts the .resources files and .gif files if any and converts them into binary DLL file belonging to satellite assembly. This file will not include any code contents and hence deploying it is efficient as well as safe.

Assume that you have a text file sampleTxt.txt and a resource file sampleResx.resx. You have to package these files into a binary DLL for deployment. Along with these files, you also have two image files sampleImg1.gif, sampleImg2.gif. These files have to be packaged into the satellite assembly as well. How do you do it? That is pictorially represented using the diagram shown below:


This output.dll (the output as shown in the diagram above) is generated using the steps shown below. The steps represent the process explained in the diagram above and each step covers the syntax involved in each conversion.

Step1: Convert the text file sampleTxt.txt into file of extension .resx using resgen.exe:
For converting the text file into .resx file using the following command:
resgen sampleTxt.txt sampleTxt.resx

Step2: Convert sampleTxt.resx and sampleResx.resx into .resources file using resgen.exe:
Use the following commands for the conversion of .resx files into .resource files:
resgen sampleTxt.resx resource1.resources
resgen sampleResx.resx resource2.resources

Step3: Build the Satellite Assembly using the .resource files and .gif files:
Now you have two resource files namely resource1 and resource2. As stated in requirement, you have two image files namely sampleImg1.gif, sampleImg2.gif. You have to package all of them and create a satellite assembly containing binary DLL of all these files. For that use the following command:

al.exe /out: output.dll /c: de /embed: resource1.resources; resource2.resources; sampleImg1.gif; sampleImg2.gif

The output.dll generated out of this command is the satellite assembly which can be deployed there by hiding any code content of your resource files and also ensuring localization

| How do you prevent a class from overriding in .NET? | How are classes related to objects in .NET Application | How are Delegates different from Events in .NET? | How are system exceptions different from application exceptions in .NET? | How are Value Types different from Reference Types in .NET? | How can a finalize method be suppressed in .NET? | How can you call Stored Procedure in ADO.NET? | How can you force Dispose method to be called automatically in .NET? | How do you call a Base Class Constructor from Derived Class Constructor in .NET? | How do you connect your VB.NET application to SQL Server? | How do you implement Cloning in .NET? | How do you implement Façade Design Pattern in .NET? | How do you implement MVC Pattern in ASP.NET? | How do you install .NET Assembly in GAC? | How is shadowing different from overriding in .NET? | How to prevent a particular .NET DLL from being decompiled? | Illustrate Delay Signing Process of an Assembly in .NET? | What are Reference Types in .NET? | What are the advantages of C#? | What are the advantages of VB.NET? | What are the differences between Namespace and Assembly in .NET? | What are the similar features between class and structure in .NET? | What are Value Types in .NET? | What do you mean by mixed mode authentication in .NET? | What do you mean by Satellite Assembly in .NET? | What do you mean by shadowing in .NET? | What is CTS in .NET? | What is ILDASM in .NET? | What is Managed Code in .NET? | What is Manifest in .NET? | What is MSIL in .NET Framework? | What is the importance of finalize method in .NET? | What is the need for Visitor Pattern in C#? | What is the purpose of bindingRedirect tag in web.config file of .NET? | What is the purpose of CodeDom in .NET? | What is the purpose of dispose method in .NET? | What is the purpose of Ngen.exe in .NET? | What is the purpose of Strong Name in COM Components of .NET? | What is the purpose of virtual keyword in .NET? | What Object Oriented Principles can be incorporated in .NET Application? |

“Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.”

| Privacy Policy for www.dotnet-guide.com | Disclosure | Contact |

Copyright - © 2004 - 2024 - All Rights Reserved.