Signing a Strong Key to an existing DLL that you don’t have its source code

If you tried to build a SharePoint solution that has a reference to DLL file that was not signed with strong key, you will get the following error

DLL referenced file not had Strong Key


To set a strong key for a DLL file that you don’t have its source code follow the mentioned steps below:

  • Open “Visual Studio Command Prompt” from Start Menu.


  • Drop the dll file in a local temp folder in drive C:\ .
  • Navigate to your DLL Path file by Typing  cd\ to go to the Root C:\
  • Type cd then Tap Button to navigate to your specific temp folder .
  • Generate the Key file.
sn -k Skey.snk
  • Get the MSIL for the assembly.
ildasm Microsoft.ApplicationBlocks.Data.dll /
  • Rename the original assembly, just in case.
ren Microsoft.ApplicationBlocks.Data.dll Microsoft.ApplicationBlocks.Data.dll.orig


  • Build a new assembly from the MSIL output and your KeyFile.
ilasm /dll /key=Skey.snk

signing DLL file

Now the DLL file should be signed with a strong key.

Note: Don't forget to add your signing file in bin folder 
for SharePoint solution "C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin"

Enjoy 🙂

See also Security Exception in SharePoint Visual WebPart


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s