Hi,
I am try to compile my source code through command prompt. The source code is place in "My Document" directory and the csc.exe is place in "windows\xxx" directory (the path is very long, I use xxx to represent the path). While I am still in "My Document" directory and try to send the simple command like this:
csc /?
it was failed because it couldn recognise the csc as a command. But when I change the directory into "windows\xxx", it is working. May I know what should I do so that I can compile the C# source code in "My Document" directory?
THank YOu @!
HOW: compile C# in command prompt
3 Answers
Know the answer? Post it. Somebody with the same question will find it here.

shaik ali4 reputationPosted May 9, 2006, 2:07 AM EDT
c:\windows\cd microsoft.net
c:\windows>microsoft.net>cd framework
c:\windows>microsoft.net>framework>cd v1.1.4322
or
c:\window>microsoft.net>framework>cd v1.0.3705
c:\windows>microsoft.net>framework>v1.1.4322>csc pathwhere ur programislocated
ex csc c:\myprogram
c:\windows>microsoft.net>framework>v1.1.4322>myprogram.exe
will be print the output
in case if u are using winnt
cd winnt
bye
Hua Hsin4 reputationPosted May 11, 2006, 1:30 AM EDT
THank YOu @!
Tom Murphy7 reputationPosted May 19, 2020, 11:08 PM EDT