Skip to navigation

PCPro-Computing in the Real World Printed from www.pcpro.co.uk

Register to receive our regular email newsletter at http://www.pcpro.co.uk/registration.

The newsletter contains links to our latest PC news, product reviews, features and how-to guides, plus special offers and competitions.

Real World Computing

Assembling assemblies

Posted on 17 Jan 2006 at 16:25

Thomas Lee looks at what .NET assemblies are made up from and shows you how to make them

The CLR then checks to see if the assembly has previously been loaded and, if so, uses the previously loaded assembly memory image.

The CLR checks the Global Assembly Cache (GAC) and, if the assembly is found in there, it's used. I'll be covering the GAC in the next column too.

Finally, the CLR locates the assembly, either by using the codebase directive specified in the app's configuration file or via a process known as probing, described below.

Probing for an assembly isn't unlike the way Windows finds an app whose name you type at a DOS Command Prompt or into the Start/Run dialog box. The CLR first looks in the folder from which the app was launched: if not found there, the CLR then looks in the folders contained in the privatePath attribute of the element, contained in the app's configuration file.

.NET gives you considerable flexibility in deployment. To deploy 'simple' apps, put all the related assemblies (the app and all of its libraries) into the same folder and just Xcopy this folder over to the client system. As I'll show you next month, for shared assemblies you can use the GAC. And you can use publisher policies to enable the CLR to redirect calls to updated versions of libraries.

In this article, we've seen what an assembly is, what it contains and how to create one. We've also examined how the .NET CLR locates and runs an assembly. Next month, I'll be looking at how you deploy .NET apps and examining the role of the GAC and the use of publisher policies.

1 2 3 4 5
Be the first to comment this article

You need to Login or Register to comment.

(optional)

advertisement

Most Commented Real World Articles
Latest Real World Computing
Latest Blog Posts Subscribe to our RSS Feeds
Latest News Stories Subscribe to our RSS Feeds
Latest Reviews Subscribe to our RSS Feeds

advertisement

Sponsored Links
 
SEARCH
SIGN UP

Your email:

Your password:

remember me

advertisement


Hitwise Top 10 Website 2008