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
  1. Home
  2. General Programming
  3. C#
  4. command line usage of csc

command line usage of csc

Scheduled Pinned Locked Moved C#
csharphelpquestion
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.
  • W Offline
    W Offline
    waheed awan
    wrote on last edited by
    #1

    csc /t:module c:\form4.cs c:\form5.cs when i use csc.exe through the command line this works and form4.netmodule is generated in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 problem1: the compiler always generates the .netmodule files in the above folder how can i specify a path where i want to generate the .netmodule file Problem2: i am trying to do this through windows application(c#) i am using this command on button_click Process.Start(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\\csc","/t:module c:\form4.cs c:\form5"); this command does not work properly if there is some error in any file form4 or form5 it is indicated but when there is no error even then the .netmodule file is not generated in the above mentioned folder

    D 1 Reply Last reply
    0
    • W waheed awan

      csc /t:module c:\form4.cs c:\form5.cs when i use csc.exe through the command line this works and form4.netmodule is generated in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 problem1: the compiler always generates the .netmodule files in the above folder how can i specify a path where i want to generate the .netmodule file Problem2: i am trying to do this through windows application(c#) i am using this command on button_click Process.Start(@"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\\csc","/t:module c:\form4.cs c:\form5"); this command does not work properly if there is some error in any file form4 or form5 it is indicated but when there is no error even then the .netmodule file is not generated in the above mentioned folder

      D Offline
      D Offline
      Daniel Monzert
      wrote on last edited by
      #2

      Hello, you'll find CSC options in the MSDN documentation. /out specifies the output file, see: http://msdn2.microsoft.com/en-us/library/bw3t50f3.aspx For compiling source code from within an application during runtime, I would suggest to make use of the System.CodeDom.Compiler classes (e.g. System.CodeDom.Compiler.CSharpCodeProvider) for compiling C#. There's also providers for other languages, unified under the ICodeCompiler interface (see MSDN). Regards, d.mon

      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