We use AssemblyVersion attribute to specify the Assembly version. The default is 1.0.0.0. The version number of an assembly consists of the following four parts:1. Major Version2. Minor Version3. Build Number4. Revision Number

You can specify all the values or you can default the Revision and Build Numbers by using the '*' as shown below:[assembly: AssemblyVersion("2.1.*")]

AssemblyCulture attribute is used for specifying the culture. By default an assembly is language neutral, as the AssemblyCulture attribute contains empty string. If you specify any string other than an empty string for the culture parameter, the assembly becomes a satellite assembly. In fact, compilers use this attribute to distinguish between main assembly (language neutral) and a satellite assembly. We will talk about satellite assemblies in a later session.

We use AssemblyKeyFile attribute to sign the assembly with a strong name. To the constructor of AssemblyKeyFile attribute, we need to pass the path of the key file, that contains the private and public key. To generate the key file1. Open Visual Studio Command Prompt2. Type the command and press enter: sn.exe -k c:\KeyFile.snk

The key file with name KeyFile.snk should be generated in the C: drive. In SN.exe, SN stands for Strong Name. Key files have the extension of .snk

Finally, In AssemblyInfo.cs file of the project, specify AssemblyKeyFile attribute as shown below and build the project. This process will strongly name an assembly.[assembly: AssemblyKeyFile("KeyFile.snk")]

A strongly named assembly should have all of the following1. The textual assembly name.2. The assembly Version number.3. The assembly should have been signed with private/public key pair.

If the assembly is not signed with private/public key pair, the assembly is weak named and not guaranteed to be unique, and may cause DLL hell. Strong named assemblies are guaranteed to be unique and solves DLL hell. You cannot install an assembly into GAC unless, the assembly is strongly named.

In the upcoming video sessions we will discuss1. What is GAC. How and when to install an assembly into GAC?2. What is DLL HELL?3. How is DLL HELL solved with .NET?