Pages

Thursday, May 23, 2013

Delay Sign Assemblies



Delay signing which  is load in to global assembly cache(GAC) without private kweword in manifest.

How to create delay signed assembly? 

step1:
      create class library project with the same name moneyTreansaction.
step2:
     open visual studio command prompt  and create abs.snk(use below code).
          C:\.....>sn-k abc.snk
step3:
     extract public keyword from abc.snk
        C:\sn-p    abs.snk  bbc.snk
step4:
    open class library project assembly info.cs
  attribute:      [assembly:assemblykeyfile(@"c:\...\bbc.snk")}
                     [assembly:assembly delay sign(true)]
step5:
   stop private key varification
   process(open vs command prumpt)
   C:\sn-Vr "full path of assembly\moneyTransaction.dll"   
step6:
  install assembly into the GAC(open vs command prumpt)
   C:\-----GACutility-;"fullpath of assembly\moneytransaction.dll"

When to Delay Sign Assemblies
In a workplace where many developers are working on a project, there is every possibility of private key of assembly being mishandled. Hence in a development environment, it becomes mandatory to maintain the integrity of the system during tests and build. This is where delay signing proves significant



No comments:

Post a Comment