Microsoft s .NET

Microsoft's .NET

The predominant CLI platform is Microsoft .NET and this is the platform of choice for development on Microsoft Windows.

  • The minimum installation that includes the compiler and the .NET Framework with C# 2.0 syntax support is the redistributable package for the .NET Framework 2.0 or higher. This is available at

  • For a rich IDE that includes IntelliSense and support for project files, install a version of the Visual Studio 2005 IDE or later. This includes Visual C# Express, which is available free at

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 .NET

If 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.

Set PATH=%PATH%;%Windir%\Microsoft.NET\Framework\v2.0.50727

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.

Essential C# 2.0
Essential C# 2.0
ISBN: 0321150775
EAN: 2147483647
Year: 2007
Pages: 185 © 2008-2017.
If you may any questions please contact us: