Renew a strong name key in assembly for a DLL file

06/01/2016 18:10
In VS, do the unload from the class that is loaded and edit the source, change the path to be updated automaticaly, the steps were produced in DOS command line:
 
--// Show the Strong Name Key
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe" -Tp "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.dll"
Public key token is 12fb31dc2b90565d
 
--// Save the Strong Name Key in a file
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe" -k "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\keyPair.snk"
 
--// Duplicate the Strong Name Key to public file
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe" -p "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\keyPair.snk" "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\publicKey.snk"
 
--// Show the Strong Name Key
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\sn.exe" -tp "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\publicKey.snk"
 
--// Execute the copy from DLL to GAC folder
cd "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\bin"
"C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\packages\Brutal.Dev.StrongNameSigner\tools\StrongNameSigner.Console.exe" -a "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.dll" -k "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\keyPair.snk"
 
--// Update the Strong Name Key in a DLL file
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\ildasm.exe" "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.dll" /out:"C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.il"
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\ilasm.exe" "C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.il" /res:"C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.res" /dll /key:"C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\keyPair.snk" /out:"C:\Projects2012\Internal Reporting\SourceControl\HubspotScraper\HubspotScraper\bin\Release\HubspotScraper.dll"
 
--// Uninstalls a DLL
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /u HubspotScraper
 
--// Installs a DLL
"C:\Program Files (x86)\Microsoft SDKs\Windows\v8.0A\bin\NETFX 4.0 Tools\gacutil.exe" /i HubspotScraper.dll
 

Crie um site com

  • Totalmente GRÁTIS
  • Design profissional
  • Criação super fácil

Este site foi criado com Webnode. Crie o seu de graça agora!