Shared Assemblies

Assemblies frequently reference other assemblies. Recall from the previous chapter that the references can be specified either by using -r switch on the C# compiler or by using a response file.

An assembly can execute only if the assembly resolver is able to locate the referenced assemblies. One way to ensure this is to deploy all the referenced assemblies in the same directory as that of the main application or a subdirectory under the application's directory, as we saw in the previous chapter. In this case, the referenced assemblies are called private assemblies as they are “private” to the application using them.

Private assemblies are good if there is only one application consuming them, and they are preferred. There are ...

Get .NET Programming: A Practical Guide Using C# now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.