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
- The ease of hacking a WEP network
- Delving into the Norton 2010 line-up
- Banish your Wi-Fi woes
- How to commit Facebook suicide
- Which smartphone keyboard is the best?
- We can beat the botnets
- Paying for code doesn’t mean owning it
- Cracking the iSCSI conundrum
- The perfect open-source task scheduler
- Exploring Microsoft Office 2010 beta
- What's that eggy smell in the server room?
- How to change the default template in Word 2007
- Book review: Rework by Jason Fried and David Heinemeier Hansson
- Panorama parents deserve their file-sharing fine
- Google and BT offer free website service to British businesses
- Lords' last chance to protect broadband customers
- Extreme handwriting recognition on the Dell Latitude XT2
- 12 surprising things that Wolfram Alpha knows
- Nokia N900: phone or pocket computer?
- The sinister side of Spotify
- Windows 7 XP Mode now runs on all processors
- Intel claims new processors boost security
- Tiny domain names to be released in UK
- Google launches bolt-ons for web apps
- Microsoft warns users off 64-bit Office 2010
- Google to steal Office Web Apps' thunder?
- Network provider admits customers still don't trust the cloud
- Twitter earned Dell $9 million
- Amazon cloud "doesn't come down at Christmas"
- Microsoft: Oracle's fighting the "evolution of the industry"
advertisement



Printed from www.pcpro.co.uk