473,414 Members | 1,590 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 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 16956
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Richard | last post by:
Just downloaded python for the fun of it. What do I run to begin coding with? Version 2.3.3 When I run the "command line" thing, I get a dos window. Now what? The built in tutor explains...
3
by: Rog | last post by:
Yes, I am guessing that typing cmd in the run windows will bring up the command prompt, but not the vs.net command prompt. Is there a switch(s) for accessing the vs.net command prompt? Or...
1
by: Jay Feldman | last post by:
I've seen some messages about the screen flashing black for a few moments when executing a program in vb.net this may be because the command prompt settings were changed. when the command prompt...
11
by: gert365 | last post by:
I'm working on a scirpt to be used on a windows machine and I need to automate a user's input on the command prompt. For example I'm using os.system('mycommand') to excute the commands I want. ...
9
by: Endless Story | last post by:
My last version of Python was 2.4, running smoothly on XP with path c: \Python24 - no need even to include this path in PATH; everything worked as it's supposed to at the command line. Just...
2
by: Gil_H | last post by:
Hi, I'm trying to run a script over unix on a remote machine. In order to automate it, the procedure requests the following: 1. Using SSH connection. 2. Operating a command on the remote...
4
by: =?Utf-8?B?WUlndWNoaQ==?= | last post by:
Hi , I want to run a batch file from the c# code. Every time i run the batch file command prompt is displayed. I do not want to show this command prompt. Is there any way to suppress the...
3
by: kimiraikkonen | last post by:
Hi experts, I just want to ask a simple procedure of my simple form. My form has a input textbox and a button. I want this if you can help me: Application user types a command prompt command...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.