Installing C# on Windows XP

Preliminary Notes

Some details in these instructions are specific to Windows XP. Installation on other Windows systems (2000, NT, ME ...) will be similar but may differ in some details.

You will need Administrator privileges to complete the steps listed here.

The C# compiler, which can be invoked from a command window, is included free with the Microsoft .Net Framework SDK. If you also require an interactive development environment (IDE) to use with the C# compiler, some additional help is provided below.

Installing the .Net Framework

Two separate downloads from Microsoft are required.

Step 1.

First, install the .NET Framework Version 1.1 Redistributable. It can be found at this URL:

You should save the downloaded file on your system and execute it.

Step 2.

Second, install the .NET Framework SDK Version 1.1. It can be found at this URL:

Again, save the downloaded file and execute it.

Step 3.

Once you have completed the two installs, you will have the Microsoft .Net Framework and the SDK (Software Development Kit) for .Net on your computer. The SDK installation includes the C# compiler. It will exist as a file named csc.exe. If you have accepted all the defaults for the installation, it will be located in a folder with a name similar to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 where the trailing four-digit number may be different if there has been a recent minor upgrade. If necessary, you can use the Search command under the start menu to locate the folder which contains the file named csc.exe.

Assuming the folder path given above, the C# compiler can be invoked in a command-line window by typing the command:
  C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\csc filename.cs
where filename.cs is the C# source code file to be compiled.

To make command-line usage more convenient, you can add that folder name to the end of the PATH environment variable. On Windows XP, the PATH variable is accessed from the System control panel:

  1. Open the Control Panel folder from the start menu.
  2. Open the System control panel, [In the Category View of the Control Panel folder, you will find it in the Performance and Maintenance section; with the Classic View of the Control Panel folder, it is right there.]
  3. Select the Advanced tab, and click on the Environment Variables button.
  4. In the User Variables list of environment variables, highlight the PATH variable and click edit. [If PATH does not appear in the list then click the New button, enter the name PATH as the variable name, enter the path to the folder as the Variable value, and ignore step 5 below.]
  5. Use the arrow key to get to the right-hand end of the string which is the Variable value; then type a semicolon followed by the path to the folder where csc.exe is located.
  6. Click OK for the PATH variable setting, click OK for the Environment Variables panel, and exit from the System control panel.
Once the PATH variable has been updated, you can open a new command window and the simple command
  csc filename.cs
should now work.

Interactive Development Environments

You can use any text editor, including NotePad and EditPad, to create and edit C# files. You just have to give the filenames the .cs extension instead of the default .txt extension. The EditPad editor is available from this URL:

You can use a combination of a text editor and an open command window. (A command window can be opened by typing the word cmd in the Run... dialog box found in the start menu.)

For developing and debugging large C# programs, an interactive development environment (or IDE) is recommended.

Here are some possibilities.
  Visual Studio .Net 2003 This is the standard IDE from Microsoft. However it costs money, and it has a large memory footprint. Students and faculty at educational institutions enrolled in the MSDNAA (Microsoft Developer Network Academic Alliance) can obtain copies of Visual Studio .Net 2003 at no additional cost. Instructions for downloading and installing MSDNAA software should be obtained through your educational institution.
  C#Builder The Personal Edition is available free from Borland: Its download and use requires registration with Borland. Its installation requires that SQL server also be installed as part of your Windows system. The C#Builder IDE and SQL server combination has a large memory footprint.
  #develop #develop (pronounced sharp develop) is an IDE for C# which is open source and therefore free. It is entirely programmed in C# itself and runs in the Windows .Net environment. Both the executable and the source code may be downloaded from the following URL:
  Eclipse Eclipse is a generic IDE, usable for several programming languages, which requires that a separate C# plugin be downloaded. Eclipse may be downloaded from this URL:   Eclipse is a large Java program (about 115MB); your system must therefore also have the Java run-time environment installed. There is currently a choice of two C# plugins:
   Improve C# editor
   Blacksun C# editor
  Antechinus This is a C# Editor with simple IDE features. It is available from this URL for US$35:
It has to be purchased.