C# compiler option - path to file?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Saser
    New Member
    • Jul 2009
    • 17

    C# compiler option - path to file?

    Hi.

    I wonder if there is any option to specify the input file path with csc.exe, like -file <file path> or -path <file path>?

    I've googled it, and I found a topic at MSDN about "C# Compiler options", but it didn't have any information about -options, only /options. In my program, I'm going to execute csc.exe with the path to a file as an argument, but it doesn't work with:

    Code:
    public void compile()
            {
                Process compile = new Process();
                string Startinfo = "\"" + compileDir + language[compLanguage] + "\"";
                compile.StartInfo.FileName = Startinfo;
                compile.StartInfo.Arguments = path;
                compile.Start();
            }
    I want to execute csc.exe as you would've done from a shortcut, and not from the Command Prompt window.

    Any ideas?

    Thanks in advance,
    Saser
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Don't you just say:
    Code:
    csc.exe c:\someFolder\SomeProjectFolder\SomeFileToCompile.cs

    Comment

    • Saser
      New Member
      • Jul 2009
      • 17

      #3
      Didn't work to me.

      Anyways, quitted working on this project for a time, just finished another program that helps me to not sit at the computer too long. ;)

      Thanks anyway
      Saser

      Comment

      Working...