Advertisement
tsnaik

WDDN lab3

Jul 16th, 2015
461
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. lab3: public assembly
  2.  
  3. in lab3.1
  4. 1. sn -k mykey.snk
  5. 2. csc /t:library /keyfile:mykey.snk calc.cs
  6. 3. gacutil -i calc.dll
  7. 4. csc /t:exe /r:calc.dll program.cs
  8. 5. prog.exe
  9. 6 . change location of program.exe to desktop
  10. 7. double click program
  11. 8. gacutil -u calc
  12. 9. 7
  13.  
  14. in lab3.2
  15.  
  16. copy key file and calc.cs
  17. change version in calc.cs to 2.0 and add console.writeline
  18. we are not going to program.exe all over again
  19. 2. csc /t:library /keyfile:mykey.snk calc.cs
  20. 3. gacutil -i calc.dll
  21. it is still running from older dll
  22.  
  23. add this in program.exe.config
  24.  
  25. <configuration>
  26. <runtime>
  27. <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  28. <dependentAssembly>
  29. <assemblyIdentity name="tsncalc" publicKeyToken="ad48e47dfb436bf8" culture="neutral" />
  30. <bindingRedirect oldVersion="1.0.0.0" newVersion="2.0.0.0" />
  31.  
  32. </dependentAssembly>
  33. </assemblyBinding>
  34. </runtime>
  35.  
  36. </configuration>
  37.  
  38.  
  39. PUBLISHER POLICY ASSEMBLY
  40. in 3.2
  41.  
  42. >al /out:policy.1.0.tsncalc.dll /keyfile:mykey.snk /link:tsncalc.xml /v:1.0.0.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement