Hi i am creating assembly and adding strong key in this way but it is not adding can any one tell me where i am getting mistake..
:\c-sharp>csc /t:library add.cs
Microsoft (R) Visual C# 2010 Compiler version 4.0.30319.1
Copyright (C) Microsoft Corporation. All rights reserved.
D:\c-sharp>sn -k mykey.snk
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
Key pair written to mykey.snk
D:\c-sharp>sn -Vr add.dll
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
add.dll does not represent a strongly named assembly
D:\c-sharp>sn -R add.dll mykey.snk
Microsoft (R) .NET Framework Strong Name Utility Version 4.0.30319.1
Copyright (c) Microsoft Corporation. All rights reserved.
add.dll does not represent a strongly named assembly
D:\c-sharp>

VulpesPosted Apr 26, 2012, 4:18 PM
SenthilkumarPosted Apr 27, 2012, 12:06 AM
You need to follow the steps.
Create the base class library and create the strong name key using the sn.exe tool.
bind the string name key file into the assembly and build it.
You need to register into GAC using the gacutil.exe.
Please go through this articles, which will guide you step by step global assembly creation.
http://srikanthtechnologies.com/articles/dotnet/globalassembly.html
http://rebuildall.umbraworks.net/2010/02/10/Global_Assembly_Cache_in_NET_4_0
http://support.microsoft.com/kb/315682