Introducing C# and the .NET Framework - Where Can I Find the .NET SDK?
(Page 9 of 12 )
In order to be able to develop C# applications you need to download the .NET Framework Software Development Kit (SDK) from Microsoft's website:
http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp
You will find in this SDK:
- The C# Compiler represented as csc.exe
- Many utility tools
- SDK Documentation and a lot of examples
You need to install the .NET Redistributable package to be able to run .NET applications. It contains the .NET Runtime and other components that are needed for running .NET applications. The Redistributable package can run on Windows 98, Windows Me, Windows 2000, Windows XP, Windows 2003 and Windows NT. In order to develop .NET applications, of course, you need to install the SDK and you're on the way to doing that now.
Note: I use Visual Studio.NET in all the code examples as it's the primary tool for developing C# and .NET Applications. You are free to use the SDK and the C# compiler but VS.NET saves a lot of time and provides a ton of features.
Configure the Path Environment
The C# compiler lives in the folder C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322, and there are some tools that we will need that live in the folder C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin, so we need to modify the path Environment Variable to refer (search in these folders) for the tools that we will be using. Thus we can compile C# applications anywhere on the hard disk, because the command-prompt will search these folders for the tools that we need if it can't find them in the current folder.
Note: I assume that you are using Windows XP.
Right click on My Computer and select Properties --> Advanced --> Environment Variables and you will get to the next windows.

In the System variables section locate the Path variable and click Edit, and the Edit System Variable Window will be shown

We need to add the following two folders that contains the C# Compiler and other .NET tools:
C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322
C:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin
To add these folders you need to append a semicolon (;) to the end of the variable value and separate each folder location with another semicolon. Add the folders and click on OK three times. And now you are ready to compile C# applications!
Next: Writing the Hello World Example with the C# Compiler >>
More C# Articles
More By Michael Youssef