Click here to Skip to main content
15,877,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I want to compile .cs file MS-DOS.

I have set path variable. set path="c:\Program Files\Microsoft Visual Studio 10.0\VC"

But when I use csc D:\sample.cs, it is showing
'csc' is not recognized as an internal or external command,
operable program or batch file.

Please help.

Thanks in advance
Updated 29-Nov-13 0:26am

Please try this:

1. Go to this location in your command prompt
2. Now execute following command:
csc [FullPath of your .cs file]

Hope this helps..
Share this answer
srmohanr 29-Nov-13 8:05am    
Thanks for your help.
I have done the same and execute it. But I got

error CS1619: Cannot create temporary file
4_none_193318f5726bf1d7\CSC8224.tmp' -- Access is denied.
That's because CSC.EXE is not in that directory.
Instead, try looking in:
or similar.
Share this answer
srmohanr 29-Nov-13 8:07am    
Thank you, it works for me.
OriginalGriff 29-Nov-13 8:23am    
You're welcome!
srmohanr 3-Dec-13 23:36pm    
Hi, I need one more help. How to run this compiled file?
Please tell me the command for it
OriginalGriff 4-Dec-13 5:34am    
Type it's name... :laugh:
Change path to this

C:\Windows\Microsoft.NET\Framework64\v2.0.50727 //Base 64 bit Os

C:\Windows\Microsoft.NET\Framework\v2.0.50727 //Base 32 bit Os
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900