Managing assemblies
Posted on 20 Mar 2006 at 12:18
Thomas Lee delves deeper into the world of .NET assemblies and their deployment management in the enterprise
-a--- 2/5/2006 2:25 PM 4096 maths2.dll
[C:\PCPRO]:
If you were now to run the client application, it wouldn't use this new DLL, however, because it was compiled to use the older DLL with a lower version number. If you've been following the examples in this article, when you run client.exe, .NET loads the maths.dll that was installed into the GAC. To get redirection to the new DLL to happen, you must first create the publisher policy file maths2redirect.cfg as follows:
publicKeyToken="c4d402178c81336a" culture="neutral"/> newVersion="1.1.1.101"/>
Then you 'compile' this policy file using the AL (Assembly Linker) tool from the .NET SDK and install the compiled file into the GAC, as follows:
C:\PCPRO>al /link:Maths2Redirect.cfg /out:Policy.1.1.Maths2.dll /keyfile:pcpro.snk /version:1.1.1.101
C:\PCPRO>gacutil /i Policy.1.1.Maths2.dll
Assembly successfully added to the cache
Once this has been done, when you next run client.exe the .NET CLR reads the publisher policy and loads the proper, later version of maths.dll.
In this column, I've looked at the GAC and provided a simple example demonstrating how to use it. Publisher Policies allow you to redirect calls to subordinate assemblies to a new version to enable updates to be issued securely for library DLLs, say to solve a security flaw. Next month, I plan to look at performance issues and some things you can do to improve the performance of .NET applications.
From around the web
advertisement
- Why virtualisation hasn't slowed the growth of data
- How to make Google AdWords work for your business
- The curse of sloppily written software
- Paying for your crimes with Bitcoin
- Behind the scenes: tech support for Formula 1
- The security risk of fat fingers
- Why Windows Phone 7 isn't quite ready for business
- When will Microsoft stop fiddling with Windows 8?
- Flash down the pan?
- Metro Style apps vs desktop applications
- Chrome's shine getting lost in translation
- BytePac: the cardboard hard disk enclosure
- How tech loosens our grip on reality
- Hokum watch: Safer Internet Day
- Why I'm deleting Adobe from my PC
- Prepare to be patronised: it's Safer Internet Day
- Dear Sony, Samsung and every other tech company in the world: stop trying to be Apple
- Will Apple's Final Cut Pro X update placate the pros?
- Smartr Contacts for iPhone review
- Switching to Office 365's Outlook Web App
- VeriSign slammed for security breach cover-up
- SAP willing to share HANA with Oracle
- Why using a tablet could harm your health
- New RIM boss: no need for drastic change
- RIM founders fall on their swords
- Slow economy helps boost Red Hat revenue by 23%
- Google+ pages get multiple admins
- One in five companies lack card industry compliance
- Oil industry warns hacking attacks could kill
- British workers fear email monitoring
advertisement

