FireworksColdFusionDreamweaverFreehandFlashMXHome
Past Week's New Content

Latest Free Content
View All
Free Content
Accessibility
CMX Learning Guides
Hosted by enterhost

Trying to compile with the Command Line compiler says it can't find 'csc' or 'vbc'

Knowledge Base

Posted by Joel

When trying to use the command line compilers to compile Microsoft .NET code, you may get an error stating:

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

To work around this issue, you must place the path of the command line tools into the Path system variable. To do so:

  1. Open the System Properties dialog from the Control Panel, or by right clicking on My Computer and choosing Properties, or by pressing [windows key] + [Pause/Break]
  2. Click on the Advanced tab, and click the Environment Variables
  3. Highlight the System Variable Path and click edit
  4. Append the paths to the command line tools to the existing value

By default, those paths are:
c:\program files\microsoft visual studio .NET\FrameworkSDK\BIN;c:\windows\microsoft.net\framework\v1.1.4322 - if you installed the SDK with Visual Studio, if you installed only the framework, the path would likely be:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322

If you'd like more information on using the command line compiler, see the article:
Demystifying .NET Compilers
http://www.communitymx.com/abstract.cfm?cid=A9938E090C326799