Technical/Business Aspects in IT

Posts Tagged ‘assembly’

Assembly generation failed — Referenced assembly does not have a strong name

Posted by scmay on July 17, 2008

Generate a snk key

Link here : http://forums.asp.net/t/1060132.aspx

First, you need to create a Public/Private Key Pair.
Choose >Start, >Programs, >Microsoft Visual Studio 2005, >Visual Studio Tools, >Visual Studio 2005 Command Prompt.
Enter the following at the command prompt and then press Enter…
sn -k C:\Temp\sgKey.snk
Now the key pair is created.

Basically, you have to disassemble and reassemble

Found this here http://forums.msdn.microsoft.com/en-US/clr/thread/35930958-9775-4e56-bd38-0362d124ffc4/

Solution of the assigning the strong name to the third part DLL by using following command on visual studio command prompt.

E.g. Lets say the name of the third party DLL is myTest.dll.
Step 1: Dis-assemble the assembly
ildasm myTest.dll /out:myTest.il

Step 2: Re-Assemble using your strong-name key
ilasm myTest.il /res:myTest.res /dll /key:myTest.snk /out:myTestSN.dll

This code work perfectly to assign strong name.

for verification you can use following command,
sn -vf myTestSN.dll

From
Nimit Patel
nimit_104@yahoo.com

Posted in Uncategorized | Tagged: | 8 Comments »