467,145 Members | 1,037 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,145 developers. It's quick & easy.

Questions regarding assembly

csc /target:module MyMod.cs

What's meaning of "NETMODULE"?

Is /target:module always going to generate xxx.netmodule?

Does C# compiler only generate the following 3 types of files: .EXE, .DLL
and .NETMODULE?

When should produce .NETMODULE files instead of others?

Is the only use of .NETMODULE files to be added to an assembly?

What's the minimum composition of an assembly? At least a .DLL file or .EXE
file?

Thanks!

Nov 15 '05 #1
  • viewed: 1862
Share:
4 Replies
fh1996 <fh****@yahoo.com> wrote:
csc /target:module MyMod.cs

What's meaning of "NETMODULE"?
It's probably easiest thought of as "part of an assembly".
Is /target:module always going to generate xxx.netmodule?
I believe so.
Does C# compiler only generate the following 3 types of files: .EXE, .DLL
and .NETMODULE?
And .PDB, really.
When should produce .NETMODULE files instead of others?
Very rarely, IME - especially as you can't have multi-code-module
assemblies in VS.NET (2002/2003 at least).
Is the only use of .NETMODULE files to be added to an assembly?

What's the minimum composition of an assembly? At least a .DLL file or .EXE
file?


Yes, IIRC - basically an assembly is a collection of modules, with the
appropriate "main" module (i.e. the one whose filename you specify)
containing a manifest saying which other modules are part of the
assembly. I can't remember what happens if the other modules also have
manifests - you could end up in strange situations, but basically you
wouldn't do that...

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
Jon Skeet [C# MVP] <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
Does C# compiler only generate the following 3 types of files: .EXE, ..DLL and .NETMODULE?


And .PDB, really.


Thanks!

PDB files are not the "end" products but something of debugging info, aren't
they?

Thus, they can't be distributed as part of application or reused by other
projects for development.

When should produce .NETMODULE files instead of others?


Very rarely, IME - especially as you can't have multi-code-module
assemblies in VS.NET (2002/2003 at least).


What's "multi-code-module"? Code written in different languages?
"Very rarely"? Then whenis the appropriate time for doing this?

Is the only use of .NETMODULE files to be added to an assembly?

What's the minimum composition of an assembly? At least a .DLL file or ..EXE file?


Yes, IIRC - basically an assembly is a collection of modules, with the
appropriate "main" module (i.e. the one whose filename you specify)
containing a manifest saying which other modules are part of the
assembly.


"main module"? What does this mean?
Nov 15 '05 #3
fh1996 <fh****@yahoo.com> wrote:
Does C# compiler only generate the following 3 types of files: .EXE,
.DLL and .NETMODULE?
And .PDB, really.


Thanks!

PDB files are not the "end" products but something of debugging info, aren't
they?


Indeed.
Thus, they can't be distributed as part of application or reused by other
projects for development.
Well, you *might* want to distribute them as part of an app for a
specific customer, to get a more detailed stack trace.

Oh, and the C# compiler can also generate XML documentation.
Very rarely, IME - especially as you can't have multi-code-module
assemblies in VS.NET (2002/2003 at least).


What's "multi-code-module"? Code written in different languages?


Yup.
"Very rarely"? Then whenis the appropriate time for doing this?


For one thing, if you really need to inclue code written in different
languages in a single assembly. Basically I wouldn't worry about it -
very few people are going to want to use it.
Is the only use of .NETMODULE files to be added to an assembly?

What's the minimum composition of an assembly? At least a .DLL file or .EXE file?


Yes, IIRC - basically an assembly is a collection of modules, with the
appropriate "main" module (i.e. the one whose filename you specify)
containing a manifest saying which other modules are part of the
assembly.


"main module"? What does this mean?


The one with the manifest / the one whose filename you specify. It's
only in that sense that it's the "main" one.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #4
Jon was right on the money but I wanted to clarify a few points:
A .netmodule is really just a .dll with a different file extension and no
assembly manifest.
The output file can have any extension you want to specify via the /out
option
An assembly consists of exactly 1 manifest and as many files as you want
(each file is listed in the manifest). It is illegal to try and create an
assembly with more than one manifest.

--
--Grant
This posting is provided "AS IS" with no warranties, and confers no rights.
Nov 15 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Daniel | last post: by
4 posts views Thread by Ramesh | last post: by
1 post views Thread by Johhy | last post: by
23 posts views Thread by TefJlives | last post: by
4 posts views Thread by =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post: by
22 posts views Thread by Scott M. | last post: by
6 posts views Thread by LessPaul | last post: by
5 posts views Thread by =?Utf-8?B?TWFyaw==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.