Getting your system ready with Microsoft .NET v1.1 SDK
Add Comment<span class="wboxheado">Introduction</span><br> Before you start learning any of the programming language its essential you have the appropriate software required for the language to compile and run. In order to learn C#, you need the C# compiler as well as the .NET Platform installed on your computer. Luckily, Microsoft provides both the C# compiler and the .NET Platform FREE! Besides these, Microsoft has packaged a variety of essential tools as well as comprehensive documentation in the .NET SDK available for download. If you already have installed the .NET SDK or Visual Studio .NET then feel free to skip this article. <br> <br> In this article I will explain in detail how to setup your computer to run the .NET SDK. As well as give you an overview of where to find essential tools, help etc. which are referenced in the articles ahead.<br> <br> <b>Note:</b> <i>Visual Studio.Net includes all the tools and documentation provided in the .NET SDK so a separate installation is not required.<br> </i> <br> <span class="wboxhead">Microsoft .NET v1.0 vs. Microsoft .NET v1.1 (vs Microsoft .NET vX.X) what should I install?</span><br> Well this issue might be a confusing issue for readers who have some idea of how the .NET Platform has been progressing. These articles have been written and tested on Microsoft .NET v1.1 (i.e. v.1.1.4322). Since most of these articles are basic I am sure even if you are on Microsoft .NET v1.0 (i.e. v1.0.3705) you should be able to successfully use these articles. <br> I am not sure if these articles will be future compatible!<br> <br> <b>Note: </b><i>You have no idea what we are speaking about? Well great, then this question does not concern you carry over to the next section. <br> </i> <br> <br> <span class="wboxhead">1) Choose the right computer</span><br> If you want to do some serious development in .NET then the System Memory (RAM) should be minimum 128 MB. To compliment the RAM you need a good processor, at least a Pentium III or equivalent. Windows XP Professional SP2, Windows 2000 SP4 are the recommended Operating Systems. Make sure you have installed Internet Information Service (IIS) on your machine before installing the .NET Runtime if you want to develop web-based applications in ASP.NET.<br> Windows XP Home edition can also be used, but since it does not of Internet Information Service component (IIS) you cannot run ASP.NET Web Applications on it Although you could use the Cassini Web Server (it installs with <a class="wbox" target="_blank" href="http://www.asp.net">Web Matrix</a> ). But you can certainly use it to learn the C# language. <br> The new Windows Server 2003 already has the .NET Framework v1.1 pre-installed so you can skip the download. <br> <br> It goes without saying that no matter which OS you are using, please make sure you have installed all the latest patches and service packs released by Microsoft.<br> <br> <span class="wboxhead">2) Download MDAC</span> <br> Microsoft Data Access Components (MDAC) is an essential component for accessing databases from .NET Applications. You need to install MDAC latest version before you install the .NET SDK. You can download MDAC v2.8 (5.4 MB) from the following link <br> [ <a target="_blank" class="wbox" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en">http://www.microsoft.com/downloads/details.aspx?FamilyID=6c050fe3-c795-4b7d-b037-185d0506396c&DisplayLang=en</a> ] <br> <br> <span class="wboxhead">3) Download the Microsoft .NET v1.1 Redistributable Runtime</span><br> In order for .NET Applications to run the .NET Runtime needs to be installed. The .NET runtime provides the platform and services on which managed applications (application written on the .NET Platform can execute). You can download the .NET Runtime (23 MB) from<br> [ <a class="wbox" target="_blank" href="http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en">http://www.microsoft.com/downloads/details.aspx?familyid=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en</a> ] <br> <br> <span class="wboxhead">4) Download the Microsoft .NET v1.1 SDK</span><br> First of all you need to download the Microsoft .NET v1.1 SDK (108 MB) from <br> [ <a class="wbox" target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en</a> ].<br> It contains the command-line compiler of C#, VB.NET and JScript.NET, developer tools (goodies..), the .NET Reference Documentation as well as a lot of sample applications. Yes, that's a huge download and there are no short-cut's (other than buying some magazines that contain the .NET v1.1 SDK). <br> <br> <span class="wboxhead">5) Install the SDK</span><br> Close any running applications and first install MDAC. Once MDAC setup is complete, and then run the .NET v1.1 Redistributable Runtime installer. A friendly wizard should take you through the steps of installing the .NET Runtime please keep all the default options selected. Next install the .NET SDK. Once the wizard completes without errors you are ready to start developing. <br> <br> <span class="wboxhead">6) Setting up the Path variables</span> <br> Generally, when the .NET SDK installs it does register the path variables used by the Operating System to find the C# compiler as well as other tools. In case you have installed Visual Studio.NET or due to some reason these variables have not been set, you cannot call the C# compiler or tools from the Command Line (gives an application not found error at the command line). <br> You need to manually setup environment variables so your OS can find the compiler/tools easily. <br> <br> Note: Perform this step only if you are using Visual Studio.NET or are sure you dont have the paths setup. If you just installed the .NET SDK, then you probably dont need to perform this step please skip it.<br> <br> In the .NET v1.1 SDK installation directory [<i><drive>:\Program Files\Microsoft .NET\FrameworkSDK\v1.1\Bin ] (default location) or [ <drive>:\Program Files\Microsoft Visual Studio .NET 2003\SDK\v1.1\Bin</i> ] (in case you have installed Visual Studio.NET 2003) there is a file <i>sdkvars.bat</i>. <br> This batch file contains all the path setup commands. Now either you can drag a copy of this file in <i>Start menu -> Program Files -> Startup</i> so its executed every time you reboot your machine setting the right path. Or you could manually click and execute this file every time before you run the compiler after a reboot. <br> Note: If you have installed Visual Studio.NET, then <b>Visual Studio .NET Command Prompt</b> does a similar thing. i.e. Every time you start this tool it sets the paths to the compiler/tools automatically for you. So you can skip this step and use this tool when ever you want to call a .NET compiler/tool from the command line. You can find this tool from <i>Start menu -> Program Files -> Microsoft Visual Studio .NET 2003 -> Visual Studio .NET Tools -> Visual Studio .NET 2003 Command Prompt</i>.<br> <br> <br> The better option is to put these settings directly into the Operating Systems environment variables. This step does require you to have administrator access to your machine. <br> Go to <i>Start menu -> Settings -> Control Panel -> System</i>. Move to the <b>Advanced Tab</b> and click on the <b>Environment Variables</b> button. Also open the <i>sdkvars.bat</i> file mentioned above in notepad. <br> Locate and select <b>Path</b> variable under <b>System Variables</b> and click <b>Edit</b> button. In the <b>Edit</b> System Variable dialog, move to the end of the <i>Variable</i> value textbox and put a semi-colon (;). <br> Now append the <i>Path</i> described in the <i>sdkvars.bat </i>file after the semi-colon. Ensure multiple paths mentioned in the <i>sdkvars.bat</i> file are copied with a semi-colon separating them. There is no need to put a semi-colon after the last path. <br> <br> For Example the <i>sdkvars.bat</i> might have a line like <br> <br> Set Path=C:\PROGRA~1\MICROS~1.NET\FrameworkSDK\v1.1\Bin\;C:\WINDOWS\MICROS~1.NET\FRAMEW~1\V11~1.432\;C:\WINDOWS\System32\;"%PATH%"<br> <br> Then you need to just copy the two .NET SDK related paths i.e<br> <br> C:\PROGRA~1\MICROS~1.NET\FrameworkSDK\v1.1\Bin\;C:\WINDOWS\MICROS~1.NET\FRAMEW~1\V11~1.432\<br> <br> Once done click <b>OK</b> on the <i>Edit System Variables</i> dialog.<br> Similarly, locate the <b>Lib</b> and <b>Include</b> entries under <i>System Variables</i> and append the relevant paths.<br> After you finish making this change, close the <b>Environment Variables</b> dialog and restart your operating system to let the changes take effect. <br> <br> <br> <span class="wboxheado">Locating important features of the .NET SDK</span><br> <br> <span class="wboxhead">1) Quick Starts</span><br> The .NET SDK contains lots of samples, the Microsoft team has compiled a list of samples that will get you quickly started with on advanced concepts of .NET like Windows Forms, ASP.NET etc. <br> After installing the .NET Samples you can view the QuickStart's for Win Forms and ASP.NET from <i>Start Menu -> Program Files -> Microsoft .NET Framework SDK -> Samples and QuickStart Tutorials</i>. They provide really good information if you know programming. <br> Note: You will first have to install the QuickStart samples from the same page given above.<br> <br> <span class="wboxhead">2) .NET Documentation</span><br> The documentation has some very good articles and examples along with the complete .NET Framework Class Library reference, so go through it. You can access the reference documentation on .NET from <i>Start -> Program -> Microsoft .NET Framework SDK -> Documentation</i>.<br> <br> <span class="wboxhead">3) C# Command Line compiler</span><br> You can find the command line C# compiler <b>csc.exe</b> at <i>C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322</i> . Also within this folder are important .NET Platform configuration tools like <i>caspol.exe</i> etc. The Microsoft .NET Base Class libraries are also located here.<br> <br> <b>Note:</b> <i>The version of .NET you have installed can be discovered from the name of the last directory. i.e. v1.1.4322.<br> </i> <br> <span class="wboxhead">4) Development Tools</span><br> All tools that help developers are placed in the <i>C:\Program Files\Microsoft .NET\FrameworkSDK\v1.1\Bin</i> directory. Tools like <i>ILDASM.exe</i> (more on this wonderful tool ahead), <i>WSDL.exe</i> etc are located in this directory. <br> <br> <span class="wboxheado">Next Step</span><br> Read <a href="http://www.mastercsharp.com/article.aspx?ArticleID=89&&TopicID=4">this article</a> that will teach you to write and compile your first C# Program. <br> <br> <span class="wboxheado">Curious Minds</span><br> <br> 1) <b>#Develop</b> An excellent open source (GNU) C# IDE available free. These guys have an awesome implementation. Check it out at [ <a class="wbox" target="_blank" href="http://www.icsharpcode.net/OpenSource/SD/Default.aspx">http://www.icsharpcode.net/OpenSource/SD/Default.aspx</a> ].<br> <br> 2) <b>C# on Linux, huh?</b><br> Thought C# was just limited to Microsoft Windows Platform?? Check out the work of these guys [ <a class="wbox" target="_blank" href="http://www.go-mono.com/team.html">http://www.go-mono.com/team.html</a> ] behind the Mono Project.<br> Mono includes: a compiler for the C# language, a runtime for the Common Language Infrastructure (also referred as the CLR) and a set of class libraries. <br> [ <a class="wbox" target="_blank" href="http://www.go-mono.com">http://www.go-mono.com</a> ]<br> <br> 3) <b>C# on FreeBSD / MAC OS X 10.2, insane ?</b><br> If you thought C# on Linux is just an exception, that wait till you look at Microsofts Shared Source Common Language Infrastructure (SSCLI)! <br> Microsoft has opened the source code of ECMA CLI as well as ECMA C# for research purpose. The release can run on FreeBSD / MAC OS X 10.2 as well as Windows XP. It does not get any more official than this!<br> [ <a class="wbox" target="_blank" href="http://www.microsoft.com/downloads/details.aspx?FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en">http://www.microsoft.com/downloads/details.aspx?FamilyId=3A1C93FA-7462-47D0-8E56-8DD34C6292F0&displaylang=en</a> ]