Deepanjan Nag
Deepanjan Nag

Reputation: 921

One assembly spanning multiple files

I know that 1 namespace can span multiple assemblies and also that 1 assembly can contain multiple namespaces.

However, what foxes me is how can one Assembly span multiple files. Is it done by simply creating the multiple assemblies with the same name in separate directories? Is that all there is to it?

Upvotes: 2

Views: 1330

Answers (2)

Edwin Groenendaal
Edwin Groenendaal

Reputation: 2324

Multi-module assemblies are not recommended. There are very specific situations where you'd want a multi-module assembly (mixing multiple languages in one assembly for example) but there are several issues with this.

An assembly is the smallest portable unit of code in .NET, and contains its own versioning information (as Pranay Rana already pointed out). This bit of information is named the Manifest of the assembly. A multi-module assembly will have one manifest module, and one or more non-manifest modules.

The other modules cannot be used outside of the assembly - the assembly is still the smallest portable unit of code. They can, however, be left out (and perhaps downloaded on demand).

For more information, see the classic post on multi-module assemblies: http://blogs.msdn.com/b/junfeng/archive/2004/07/15/183813.aspx

Upvotes: 0

Pranay Rana
Pranay Rana

Reputation: 176916

Its not possible to do that because each assebly contains its own versioning information...so even if you create two assembly with same name they are different by the version information.

This issue called as DLL hell which is resolved by .net

EDIT

you can make use of Extension methods available in 3.5 to extend the DLL...

Upvotes: 1

Related Questions