471,319 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

where's the .net command prompt?

I have .net 2002 edu version and when it installed there was a shortcut to
the .net command prompt. My CLR disk is scratched so I can't reinstall and
so I just downloaded express.

I dont know how to access the command prompt so I can compile basic files
from this book I'm reading. I found this really cool resource here that
would save me a lot of typing by being able to sense which directory I'm in
http://www.codeproject.com/csharp/CommandBar.asp

but when I try to csc myfile.cs it just says

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

What to do?
Thanks
Dec 30 '05 #1
6 16819
Well the error message means that csc.exe does not exist along any of
the paths defined in the PATH environmental variable.

My command prompt (.Net 2003) uses the following command

%comspec% /k "C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\vsvars32.bat"

There should be a vsvars32.bat file on your machine, this will set all
the environmental variables required (PATH,INCLUDE and LIB).

Dec 30 '05 #2
Jwolf <me@nospam.com> wrote:
I have .net 2002 edu version and when it installed there was a shortcut to
the .net command prompt. My CLR disk is scratched so I can't reinstall and
so I just downloaded express.
And have you looked for the batch file in there? Certainly in the
professional edition, vsvars32.bat is in the Common7\Tools directory
under the installation root.
I dont know how to access the command prompt so I can compile basic files
from this book I'm reading. I found this really cool resource here that
would save me a lot of typing by being able to sense which directory I'm in
http://www.codeproject.com/csharp/CommandBar.asp

but when I try to csc myfile.cs it just says

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

What to do?


Well, the only really important part of the batch file (as far as most
C# is concerned) is changing the path. Just set the path to include
c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
and you should be good to go. (Use c:\WINNT on NT, obviously.)

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dec 30 '05 #3
I just searched my computer and didn't find vsvars32.bat

I dont have 2003 anymore because one of my installation disks is scratched
and I can't reinstall. I'm using C# express now.

The only thing I have in C:\Program Files\Microsoft Visual Studio
8\Common7\Tools is a vdt folder
Dec 31 '05 #4
Right Click on My Computer and Select Properties.
Select the Advanced Tab and Press Environmental Variables.
Scroll down System Variables select Path and press edit.
At the end of the line add
;c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 Press OK.
OK out of all the dialogs, now everytime you start a command prompt it
should be able to find csc.exe

Jan 1 '06 #5
With the Express products, you may not have a "loaded" command prompt. But
there's still hope.

When you install VS, you also install the .NET SDK which, I believe, is
where the command prompt actually comes from. So, if you download and
install the .NET SDK independent of VS, you will also have a SDK command
prompt.
--
Christopher A. Reed
"The oxen are slow, but the earth is patient."

"Jwolf" <me@nospam.com> wrote in message
news:un**************@TK2MSFTNGP14.phx.gbl...
I have .net 2002 edu version and when it installed there was a shortcut to
the .net command prompt. My CLR disk is scratched so I can't reinstall and
so I just downloaded express.

I dont know how to access the command prompt so I can compile basic files
from this book I'm reading. I found this really cool resource here that
would save me a lot of typing by being able to sense which directory I'm
in
http://www.codeproject.com/csharp/CommandBar.asp

but when I try to csc myfile.cs it just says

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

What to do?
Thanks

Jan 1 '06 #6
TONM, I just tried that but it still does the same thing.

Christopher, I'm downloading the independant installer now... kinda of big
so I'll post back after its done and installed.
Jan 2 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Richard | last post: by
3 posts views Thread by Rog | last post: by
1 post views Thread by Jay Feldman | last post: by
9 posts views Thread by Endless Story | last post: by
2 posts views Thread by Gil_H | last post: by
4 posts views Thread by =?Utf-8?B?WUlndWNoaQ==?= | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.