Microsoft's .NETThe predominant CLI platform is Microsoft .NET and this is the platform of choice for development on Microsoft Windows.
For command-line compilation, regardless of a Visual Studio install or only the runtime, you must set the PATH environment variable to include the C# compiler, CSC.EXE. Setting Up the Compiler Path with Microsoft .NETIf Visual Studio .NET is installed on your computer, open the command prompt from the Start menu by selecting All Programs->Microsoft Visual Studio .NET->Visual Studio Tools->Visual Studio Command Prompt. This command prompt places CSC.EXE in the path to be available for execution from any directory. Without Visual Studio .NET installed, no special compiler command prompt item appears in the Start menu. Instead, you need to reference the full compiler pathname explicitly or add it to the path. The compiler is located at %Windir%\Microsoft.NET\Framework\<version>, where <version> is the version of the .NET Framework (v1.0.3705, v1.1.4322, v2.0.50727, and so on) and %Windir% is the environment variable that points to the location of the Windows directory. To add this location to the path use Set PATH=%PATH%;%Windir%\Microsoft.NET\Framework\<version>, again substituting the value of <version> appropriately. Output A.1 provides an example. Output A.1.
Once the path includes the framework, it is possible to use the .NET C# compiler, CSC.EXE, without providing the full path to its location. |