can a single file contain more than one assembly?

P

Peter Rilling

Okay, the other day I was talking with someone about assemblies. He said
something that I am not really sure about. He said that a DLL or EXE can
contain more then one assembly (although the IDE only works with one). Now,
I know that assemblies can be made up of more than one file, but I have
never heard about it where a single file has more then one assembly. I know
that files can have more than one module, but what about assemblies? Can
someone confirm or deny this?
 
K

Kevin Spencer

From what I've read, you can only have one manifest in a file, which means
that you can only have one assembly in a file, although that assembly can
span multiple files. If it is a multi-file assembly, only one of the files
can contain the manifest. You may find the following reference helpful, as
well as all the references it links to:

http://msdn.microsoft.com/library/d...guide/html/cpconprogrammingwithassemblies.asp

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
W

Willy Denoyette [MVP]

Peter Rilling said:
Okay, the other day I was talking with someone about assemblies. He said
something that I am not really sure about. He said that a DLL or EXE can
contain more then one assembly (although the IDE only works with one).
Now, I know that assemblies can be made up of more than one file, but I
have never heard about it where a single file has more then one assembly.
I know that files can have more than one module, but what about
assemblies? Can someone confirm or deny this?

While an assembly can span multiple "files", a "file" cannot contain
multiple assemblies.

Willy.
 
B

Bob Powell [MVP]

From the other answers to this post I think there is a nomenclature problem
here.

Take a look at AL.EXE the Assembly Linker. This enables you to package
several assemblies into one. Is this what you need?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 
W

Willy Denoyette [MVP]

AL only takes "netmodule" or "resource" files as input to produce an
assembly! It cannot combine multiple "assembly" files into a single assembly
file.

Willy.
 
B

Bob Powell [MVP]

Ok, you're right and I feel like an idiot now. However I answered because I
know I've done this in the past and I can't remember now how the heck I did
it. I have about 20,000 projects in my archives.. I need to go do some
searching.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top