Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Assembly ??????

Assembly ??????

Scheduled Pinned Locked Moved C#
helpcsharpcomquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Leesen
    wrote on last edited by
    #1

    hi, all. Two source file are showed as follows. [Try.cs:] using System ; namespace g { public class Activex { public static void Main ( ) { my myApp=new my(); myApp.SayByeBye(); return; } } } [ll.cs] using System; namespace g { public class my { public void SayByeBye() { System.Console.WriteLine("PPMM is good ,"); return; } } } then ,I want to add this two files into the same assembly. firstly: csc /t:library ll.cs csc /addmodule: ll.netmodule try.cs But after I try several times, there is always erros . Error Message as follows: error CS2005: Missing file specification for '/addmodule:' command-line option error CS2001: Source file 'll.netmodule' could not be found Try.cs(8,4): error CS0246: The type or namespace name 'my' could not be found (are you missing a using directive or an assembly reference?) Try.cs(9,4): error CS0246: The type or namespace name 'myApp' could not be found (are you missing a using directive or an assembly reference?) who can tell me why?? Your advanced help will be appreciated Regards.

    J 1 Reply Last reply
    0
    • L Leesen

      hi, all. Two source file are showed as follows. [Try.cs:] using System ; namespace g { public class Activex { public static void Main ( ) { my myApp=new my(); myApp.SayByeBye(); return; } } } [ll.cs] using System; namespace g { public class my { public void SayByeBye() { System.Console.WriteLine("PPMM is good ,"); return; } } } then ,I want to add this two files into the same assembly. firstly: csc /t:library ll.cs csc /addmodule: ll.netmodule try.cs But after I try several times, there is always erros . Error Message as follows: error CS2005: Missing file specification for '/addmodule:' command-line option error CS2001: Source file 'll.netmodule' could not be found Try.cs(8,4): error CS0246: The type or namespace name 'my' could not be found (are you missing a using directive or an assembly reference?) Try.cs(9,4): error CS0246: The type or namespace name 'myApp' could not be found (are you missing a using directive or an assembly reference?) who can tell me why?? Your advanced help will be appreciated Regards.

      J Offline
      J Offline
      James T Johnson
      wrote on last edited by
      #2

      The library target creates a dll assembly; if you want two sources files in the same assembly compile them in the same command line... csc /t:library /o:ll.dll ll.cs try.cs HTH, James Simplicity Rules!

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups