View Full Version : VC# compile problem

11-16-2008, 11:32 PM
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.

11-17-2008, 03:10 AM
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.

11-17-2008, 03:46 AM
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?

11-17-2008, 03:57 AM
Never mind. Of course: it's called "csc.exe".