Signing an assembly

There are three steps that need to be taken in order to use a key pair when signing an assembly created with FTN95.

1. Create a key by using the Microsoft .NET SDK tool sn.exe (Search in titles for "Creating a Key Pair").

2. Using FTN95, create an MDL rather than DLL. There are two ways to do this:

a) from Visual Studio, select the project Properties window and set the Output File Type in the Compiler Options to MDL, or

b) from the command line, invoke DBK_LINK, or DBK_LINK2 or DBK_LINK4 using MDL as the extension of the output file.

3. The .NET module can then be used as input to the Microsoft .NET assembly linker, al.exe. This Microsoft linker is used to sign a .NET assembly so that it can be placed in the Global Assembly Cache. Here is an example of a suitable command line:

al.exe infile.mdl /keyfile:key.snk /out:outfile.dll

This creates a .NET assembly called outfile.dll, signed with key.snk and including the file infile.mdl . For further information about al.exe see Assembly Linker.

For information about strong-named assemblies see Creating and Using Strong-Named Assemblies.



Copyright © 1999-2024 Silverfrost Limited