Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 11-16-2008, 06:37 PM   #1 (permalink)
 
Junior Techie

Join Date: Nov 2008

Posts: 79

BobLewiston is on a distinguished road

Default VC# compile problem

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.
BobLewiston is offline  
Old 11-16-2008, 07:04 PM   #2 (permalink)
Baez's Avatar
 

Join Date: Sep 2005

Location: Toronto, Canada

Posts: 5,466

Baez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of lightBaez is a glorious beacon of light

Default Re: VC# compile problem

When you have the HelloWorld.cs file open in Visual Studio press Ctrl + F5 and it will compile and run it.
__________________

Baez is offline  
Old 11-17-2008, 08:54 AM   #3 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: VC# compile problem

You may need to edit your windows Path variable to include the directory where the C# compiler resides. You could also specify the complete path instead of just 'csc'. However, if you're going to compile from the command line, you really should be using the .NET SDK command prompt, not the regular command prompt.

From a practical point of view, you should be using Visual Studio. If you're serious about pursuing a career in Windows programming, you'll need a thorough understanding of Visual Studio, as it will be your primary development and debugging tool. I would recommend you start using it now.

Last edited by jaeusm; 11-17-2008 at 03:51 PM.
jaeusm is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem installing software in windows xp pro imagesmith Windows Operating Systems and Software 3 02-20-2008 02:46 PM
Serious computer problem. HeeRoMaKi Hardware Troubleshooting 71 07-28-2007 11:42 PM
Wireless Problem! dropper Computer Networking & Internet Access 3 07-08-2007 04:58 PM
Dhcp leasing problem Kloppstock Computer Networking & Internet Access 12 05-13-2007 07:13 PM
cant find the problem... Jhill1 Hardware Troubleshooting 13 05-07-2007 04:51 PM