Previous Topic: AssembliesNext Topic: Compilation


Strong Naming

Microsoft introduced strong naming to improve the runtime security of the application. Assemblies created by CA Gen are strongly named. Therefore, the assembly containing the EABs must also be strongly named.

Use the following procedure to create a strongly named assembly:

Follow these steps:

  1. Create the key file to be referenced by assemblyinfo.cs. Click Start, All Programs, Microsoft Visual Studio 2010, Visual Studio Tools, Visual Studio Command Prompt (2010). At the command prompt, enter the following command:
    sn -k eab.snk
    
  2. Create an assemblyinfo.cs file that contains the following text:
    using System;
    using System.Reflection;
    
    [assembly: AssemblyCompanyAttribute ("your company name")]
    [assembly: AssemblyDescriptionAttribute ("a description")]
    
    [assembly: AssemblyVersionAttribute ("1.0.0.0")]
    [assembly: AssemblyKeyFileAttribute ("eab.snk")]
    [assembly: CLSCompliantAttribute(true)]
    

    The only required entries are AssemblyKeyFileAttribute and CLSCompliantAttribute. There are several more assembly-level attributes that may be set.

    Note: For more information, see the Microsoft documentation.

    These two files will be used during compilation.