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.
advertisement
- Getting to grips with Microsoft's IT Health Environment Scanner
- Virtualise your servers
- The changing face of travel gadgets
- Build your own distributed file system
- The bulletproof Dell that costs an arm and a leg
- Microsoft Office 2010 Technical Preview: Q&A
- Lawnmowers, the TyTN II and one odd insurance request
- There'll never be a bulletproof OS
- How far can we trust apps?
- Five nice touches in Outlook 2010
- Why Britain's watchdogs have fewer teeth than goldfish
- Tabbed documents: how to make Office 2010 great
- Outlook 2010 People Pane – does it spell death to Xobni
- Microsoft Outlook 2010 screenshots
- Co-Authoring in Word 2010 and SharePoint Foundation 2010
- Microsoft Outlook 2010 screenshots: Backstage view
- Flash 10.1: Developing for Desktop and Device
- Microsoft Office 2010 screenshots: Recover unsaved items
- Microsoft Word 2010 screenshots: Text Effects
- Microsoft Word 2010: inserting screenshots
- Q&A: Why Conficker was a victim of its own success
- App developers losing faith in Android
- Biz Stone: Murdoch's Google veto will "fail fast"
- Google adds automatic captions to YouTube
- China ramps up cyber spying
- Mozilla maintains dependence on Google
- Windows 7 flying off the shelves
- Google Chrome OS: full details unveiled
- AOL slashes 2,500 jobs
- YouTube begins streaming full-length shows
advertisement
Printed from www.pcpro.co.uk


