How can I compile c# program from command line - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How can I compile c# program from command line

NadiaDCNadiaDC Posts: 2Member
I tried to compile c# program from command line and I recieved this message "The name specifined is not recognized as an internal or external command, operable program or batch file."

Comments

  • PsightoplazmPsightoplazm Posts: 332Member ✭✭
    I assume you are attempting to run the csc.exe executable from the command prompt - if so, that error means the path you are giving the command prompt is the wrong one. So if for example 'csc.exe' is stored on your C drive you would specify 'c:csc.exe'.
    What usually causes this is you have a space or something in one of the directories in your path and you are not enclosing the path in quotation marks
    So instead of
    C:My Directorycsc.exe

    you should be using
    "C:My Directorycsc.exe"

    oooor if you are just typing in "csc" as stated in the msdn article [link=http://msdn.microsoft.com/en-us/library/78f4aasd(VS.80).aspx]here[/link] then your computer is saying that it doesn't know where csc is and you have to either set it up to know where it is, or just specify the path of csc yourself.
    ><//~Psightoplasm`~
  • libicong00libicong00 Posts: 3Member
    The right answer
  • libicong00libicong00 Posts: 3Member
    The right answer
  • libicong00libicong00 Posts: 3Member
    The right answer
Sign In or Register to comment.