Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Nov 2008
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VC# compile problem

    I installed VC# 2008 Express. Following the lessons at C# School at programmersheaven.com, I tried to compile the sample app HelloWorld

    from the command prompt via:

    csc HelloWorld.cs

    but I got back:

    'csc' is not recognized as an internal or external command, operable program or batch file.

    As far as I know, the VC# install is OK. When I did the install, it said it was also installing .Net 3.5, SQL and a lot of other stuff, so I assume it also installed the actual compiler(s). When I click on the desktop icon, the IDE comes up without any error messages.

    I didn't try to compile from the IDE though, because it looked a bit more involved, so I thought I'd follow the lessons in order.

    Any idea where I went wrong?

    P.S. I'm running under Windows XP Professional, Service Pack 2.

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    When you installed VC# express, in the program group in the start menu is there a tools group? Inside of that there should be a command prompt shortcut, use that and then try and run csc.

    The problem is that the location of the compiler is not in your default path so the command prompt can't find it by default.
    OracleGuy

  • #3
    Regular Coder
    Join Date
    Nov 2008
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    oracleguy:

    Sounds reasonable but I'm not sure of the path since I can't find the C# compiler in either C:\Program Files\Microsoft Visual Studio 9.0\VC# or
    C:\Program Files\Microsoft Visual Studio 9.0\Microsoft Visual C# 2008 Express Edition with SP1 - ENU (not that I know the compiler's name). Does ANYBODY know the Visual C# 2008 Express compiler's name and/or path?

  • #4
    Regular Coder
    Join Date
    Nov 2008
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Never mind. Of course: it's called "csc.exe".


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •