Not logged in - Login

Add a strong name to a DLL

The following steps detail how take a DLL that does not have a strong name and give it a strong name.

In the following example, a DLL called 'Test.dll' does not have a strong name. We create a strong name key file for it and sign the DLL with the strong name.

Step 1 : Run visual studio command prompt and go to directory where your DLL located.

For Example my DLL located in D:\MyFolder\Test.dll

Step 2 : Now create il file using below command.

D:\MyFolder> ildasm /all /out=Test.il Test.dll

(This command generate code library. Several files are output to the current directory.)

Step 3 : Generate new Key for sign your project.

D:\MyFolder> sn -k mykey.snk

Step 4 : Now sign your library using ilasm command.

D:\MyFolder> ilasm /dll /key=mykey.snk Test.il

At this point, the file Test.dll will be signed with a strong name key.

Information pulled from the following site: Referenced assembly does not have a strong name