943,522 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 737
  • C# RSS
Nov 16th, 2008
0

VC# compile problem

Expand Post »
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.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Junior Poster
BobLewiston is offline Offline
105 posts
since Nov 2008
Nov 16th, 2008
1

Re: VC# compile problem

csc is not in your path. Add the directory in which csc lives to your PATH environment variable.
Team Colleague
Reputation Points: 1133
Solved Threads: 171
Super Senior Demiposter
Rashakil Fol is offline Offline
2,478 posts
since Jun 2005
Nov 16th, 2008
0

Re: VC# compile problem

csc is not in your path. Add the directory in which csc lives to your PATH environment variable.
As Johnny Carson used to say: "You are correct, sir."
Reputation Points: 10
Solved Threads: 0
Junior Poster
BobLewiston is offline Offline
105 posts
since Nov 2008
Nov 17th, 2008
0

Re: VC# compile problem

maybe i'm more of an ide guy than command line, but for the editor, you just need to add a class and click Build - Build Solution and voila!!!!
Reputation Points: 133
Solved Threads: 141
Veteran Poster
dickersonka is offline Offline
1,162 posts
since Aug 2008
Nov 18th, 2008
0

Re: VC# compile problem

In the pro version you can have a command window with all the needed paths preinstalled in the PATH variable.
In the express version you can use the "Create your first application" on the startpage. It opens a window wich contains a link to creating a console application as well.
But to be honest I'm more a dickersonka kinda guy! Use the IDE! Use the commandline if you absolutly can't do without it. I have seen enough unix commandlines in my life to know what I'm talking about.
Last edited by ddanbe; Nov 18th, 2008 at 2:00 pm. Reason: typo
Reputation Points: 2023
Solved Threads: 644
Senior Poster
ddanbe is offline Offline
3,735 posts
since Oct 2008
Nov 20th, 2008
0

Re: VC# compile problem

if you don't want to add the location of csc to you path you could always fully qualify the location when you compile, ie: c:\windows\microsoft.net\framework\v2.0.blablabla\csc.exe helloworld.cs, although I don't know why on earth you would wanna type this in every time.
Reputation Points: 11
Solved Threads: 0
Light Poster
bondo is offline Offline
43 posts
since Apr 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: Cant end the excel process
Next Thread in C# Forum Timeline: PLZ HELP





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC