----------box---------- 1.using System; 2. 3.namespace MyDataModule 4.{ 5. /// 6. /// Summary description for Class1. 7. /// 8. public class DataModuleCls 9. { 10. public DataModuleCls() 11. { 12. // 13. // TODO: Add constructor logic here 14. // 15. } 16. public static void WhoAmI() 17. { 18. Console.WriteLine("I am User-Definet .NET Object, 19. \r\nreside in a separated Data Module."); 20. } 21. } 22.} ---------end---------- ---------BOX---------- 1.using System; 2.using MyDataModule; 3. 4.namespace MyDataModuleApp 5.{ 6. /// 7. /// Summary description for Class1. 8. /// 9. class DataModuleApp 10. { 11. /// 12. /// The main entry point for the application. 13. /// 14. [STAThread] 15. static void Main(string[] args) 16. { 17. // 18. // TODO: Add code to start application here 19. // 20. DataModuleCls.WhoAmI(); 21. } 22. } 23.} ---------end---------- -----box----- csc.exe [option] [C# Source File] -----end----- -----box----- 1.csc /target:module DataModule.cs 2.csc /target:exe /addmodule:DataModule.netmodule DataModuleApp.cs -----end----- -----box----- I am User-Definet .NET Object, reside in a separated Data Module. ----end----- ---------BOX---------- 1.using System; 2. 3.namespace SNLib 4.{ 5. /// 6. /// Summary description for Class1. 7. /// 8. public class StrongNameCls 9. { 10. public StrongNameCls() 11. { 12. // 13. // TODO: Add constructor logic here 14. // 15. } 16. public static void WhoAmI() 17. { 18. Console.WriteLine("I am StrongNameCls,\r\n 19. reside in a Strong-Named Assembly"); 20. } 21. } 22.} ----------end---------- -----box----- sn.exe [option] parameters -----end----- ---------BOX---------- sn ¡Vk mykey.snk ----------end---------- ----------BOX---------- 1.[assembly:AssemblyDelaySignAttribute(false)]; 2.[assembly:AssemblyKeyFileAttribute("..\\..\\mykey.snk")]; 3.[assembly:AssemblyKeyNameAttribute("")]; ----------end---------- ---------BOX---------- Microsoft (R) .NET Framework Strong Name Utility Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Assembly 'SNLib.dll' is valid ----------end---------- ---------BOX---------- al.exe source [option] ----------end---------- ----------BOX---------- al.exe a.netmodule b.netmodule /target:exe /main:ClassA.main /out:myapp.exe ----------end---------- ----------BOX---------- csc /target:module SNLib.cs al SNLib.netmodule /target:library /keyfile:mykey.snk /out:ManualSN.dll ----------end---------- ----------BOX---------- Microsoft (R) .NET Framework Strong Name Utility Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Assembly 'ManualSN.dll' is valid ----------end---------- ----------BOX---------- sn.exe ¡VTp SNLib.dll sn.exe ¡VTp ManualSN.dll ----------end---------- ---------BOX---------- sn ¡Vp mykey.snk mypkey.snk ----------end---------- ----------BOX---------- 1.[assembly:AssemblyDelaySignAttribute(true)]; 2.[assembly:AssemblyKeyFileAttribute("mypkey.snk")]; 3.[assembly:AssemblyKeyNameAttribute("")]; ----------end---------- ----------BOX---------- Microsoft (R) .NET Framework Strong Name Utility Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Failed to verify assembly -- Unable to format error message 8013141A -----------end---------- ----------BOX---------- sn.exe ¡VR SNLib.dll mykey.snk ----------end---------- ---------BOX---------- 1.using System; 2.using SNLib; 3. 4.namespace SNApp 5.{ 6. /// 7. /// Summary description for Class1. 8. /// 9. class SNAppCls 10. { 11. /// 12. /// The main entry point for the application. 13. /// 14. [STAThread] 15. static void Main(string[] args) 16. { 17. // 18. // TODO: Add code to start application here 19. // 20. StrongNameCls.WhoAmI(); 21. } 22. } 23.} ---------end---------- ---------BOX---------- I am StrongNameCls, reside in a Strong-Named Assembly ---------end---------- ---------BOX---------- gacutil.exe [options] Assembly ---------end ---------BOX---------- Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Assembly successfully added to the cache ----------end---------- ---------BOX---------- Microsoft (R) .NET Global Assembly Cache Utility. Version 1.0.3705.0 Copyright (C) Microsoft Corporation 1998-2001. All rights reserved. Assembly: SNLib, Version=1.0.967.8720, Culture=neutral, PublicKeyToken=cc768417a 22494cb, Custom=null Uninstalled: SNLib, Version=1.0.967.8720, Culture=neutral, PublicKeyToken=cc7684 17a22494cb, Custom=null Number of items uninstalled = 1 Number of failures = 0 ----------end----------