Questions regarding assembly

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • fh1996

    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!



  • Jon Skeet [C# MVP]

    #2
    Re: Questions regarding assembly

    fh1996 <fh1996@yahoo.c om> wrote:[color=blue]
    > csc /target:module MyMod.cs
    >
    > What's meaning of "NETMODULE" ?[/color]

    It's probably easiest thought of as "part of an assembly".
    [color=blue]
    > Is /target:module always going to generate xxx.netmodule?[/color]

    I believe so.
    [color=blue]
    > Does C# compiler only generate the following 3 types of files: .EXE, .DLL
    > and .NETMODULE?[/color]

    And .PDB, really.
    [color=blue]
    > When should produce .NETMODULE files instead of others?[/color]

    Very rarely, IME - especially as you can't have multi-code-module
    assemblies in VS.NET (2002/2003 at least).
    [color=blue]
    > 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?[/color]

    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 - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • fh1996

      #3
      Re: Questions regarding assembly

      Jon Skeet [C# MVP] <skeet@pobox.co m> wrote in message
      news:MPG.1a357f 5c227a0c19989b7 9@msnews.micros oft.com...[color=blue][color=green]
      > > Does C# compiler only generate the following 3 types of files: .EXE,[/color][/color]
      ..DLL[color=blue][color=green]
      > > and .NETMODULE?[/color]
      >
      > And .PDB, really.
      >[/color]

      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.

      [color=blue][color=green]
      > > When should produce .NETMODULE files instead of others?[/color]
      >
      > Very rarely, IME - especially as you can't have multi-code-module
      > assemblies in VS.NET (2002/2003 at least).
      >[/color]

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

      [color=blue][color=green]
      > > 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[/color][/color]
      ..EXE[color=blue][color=green]
      > > file?[/color]
      >
      > 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.[/color]

      "main module"? What does this mean?


      Comment

      • Jon Skeet [C# MVP]

        #4
        Re: Questions regarding assembly

        fh1996 <fh1996@yahoo.c om> wrote:[color=blue][color=green][color=darkred]
        > > > Does C# compiler only generate the following 3 types of files: .EXE,
        > > > .DLL and .NETMODULE?[/color]
        > >
        > > And .PDB, really.[/color]
        >
        > Thanks!
        >
        > PDB files are not the "end" products but something of debugging info, aren't
        > they?[/color]

        Indeed.
        [color=blue]
        > Thus, they can't be distributed as part of application or reused by other
        > projects for development.[/color]

        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.
        [color=blue][color=green]
        > > Very rarely, IME - especially as you can't have multi-code-module
        > > assemblies in VS.NET (2002/2003 at least).[/color]
        >
        > What's "multi-code-module"? Code written in different languages?[/color]

        Yup.
        [color=blue]
        > "Very rarely"? Then whenis the appropriate time for doing this?[/color]

        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.
        [color=blue][color=green][color=darkred]
        > > > 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[/color][/color]
        > .EXE[color=green][color=darkred]
        > > > file?[/color]
        > >
        > > 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.[/color]
        >
        > "main module"? What does this mean?[/color]

        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 - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        • Grant Richins [MS]

          #5
          Re: Questions regarding assembly

          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.


          Comment

          Working...