Signing a .NET Assembly

 

Introduction

A translated .NET satellite DLL for a strong-named .NET assembly (source) file is created by RC-WinTrans as a delay-signed assembly.  Such a delay-signed satellite DLL must be signed with the private key file (file extension = .snk) using the "sn.exe" command line tool from Microsoft.

 

If a .NET source file (a .NET assembly EXE or DLL) is a strong-named signed assembly, this will be indicated in RC-WinTrans' Source Files page (Source and Target Files dialog box).  The Target Files page will only indicate whether a translated satellite DLL is delay-signed.

 

NOTE:  A .NET satellite DLL created by RC-WinTrans must be signe  with the private key (.snk file) if the source file is a strong-named assembly.

 

 

"OnSignAssembly" (RC-WinTrans Event)

RC-WinTrans fires an event named "OnSignAssembly" after creating a translated (delay-signed) satellite DLL for a strong-named assembly (source file).  You can catch the event to sign the satellite with your private key or to prompt information, for example.

 

In the "Samples" directory of RC-WinTrans (...\Samples\Developing\VBA), you can find a macros file that has implemented an event handler class as an event handler for "OnSignAssembly."  The file name is "SignAssembly.macro."

 

See also:  "Event Handler."

 

The event handler for "OnSignAssembly" in the file "SignAssembly.macro":

 

Private Sub EventHandlerClass_OnSignAssembly _

                                            (ByVal ProjFile As ProjectFile, _

                                             ByVal TargetFile As String, _

                                             ByVal LangCode As String,
                                ByVal KeyFile As String, _

                                             ByVal Done As ReturnBoolean)

 On Error GoTo ErrHandler

 

 RCWinTrans.Windows.MultiViewBar.Output.AddText ("----------------------------------")

 RCWinTrans.Windows.MultiViewBar.Output.AddText ("Delay signed satellite DLL created.")

 RCWinTrans.Windows.MultiViewBar.Output.AddText ("File name: " & TargetFile)

 RCWinTrans.Windows.MultiViewBar.Output.AddText ("The DLL must be signed.")

 RCWinTrans.Windows.MultiViewBar.Output.AddText ("----------------------------------")

 Done = False

 

ErrHandler:

  

End Sub

 

 

^ Top ^