Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't get csc.exe to run from any dir I happen to be in

1 view
Skip to first unread message

MS

unread,
Aug 9, 2005, 4:54:36 PM8/9/05
to
Hi,

This should be trivial but I can't get csc.exe to run from any dir that I
happen to be in.

I had this setup before but just installed 'dotnet 2.0 beta 2 Framework
SDK'. When I click on the 'SDK Command Prompt' (Start Menu, Programs, .Net
Menu) I get a command window which starts in the dir:

"C:\Program Files\Microsoft.NET\SDK\v2.0"

"csc whatever.cs" works fine there.

so I added that path to my environment variable 'path', but csc still
didn't work from any dir EG. "C:\JMS\CSHARP\Soduku". Strange! Closer
inspection revealed csc.exe is not in:

"C:\Program Files\Microsoft.NET\SDK\v2.0"

but is actually in:

"C:\WINNT\Microsoft.NET\Framework\v2.0.50215"

so I added that dir to my 'path' too. It still doesn't work.

How do I get this working so I don't have to worry about the path to
csc.exe when I'm compiling?

Thanks,

MS

Bob Powell [MVP]

unread,
Aug 9, 2005, 6:33:56 PM8/9/05
to
The VS command promps runs the SDKVARS.BAT file that is situated in the SDK
directory. On my machine the path is:

C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin\sdkvars.bat

It may be different on yours.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"MS" <matthews@mailsnare.---nojunktakeout---.net> wrote in message
news:uQ4shSSn...@TK2MSFTNGP15.phx.gbl...

Ken Wilson

unread,
Sep 27, 2005, 2:24:07 AM9/27/05
to

Are you trying to do your compiling from the SDK command window?

If so you should be able to change directories to the one holding your
code (cd) and run the 'csc' command from there.
Ken Wilson
Seeking viable employment in Victoria, BC

0 new messages