Methods for configuring system environment variables in C # _c# tutorial

Source: Internet
Author: User
Tags net command
Before you can use any. NET SDK command-line tools, including the C # compiler, you need to configure your development computer to recognize their presence. The easiest way to do this is to use Start | All Programs | Visual Studio 2005 | Visual Studio Tools menu option to start a preconfigured Visual studio command prompt. This particular console can automatically initialize the necessary environment variables without you performing any action. (Visual Studio. NET 2003 users need to start their respective command prompts).

Note If you do not have Visual Studio, but you have installed the. NET Framework SDK, you can start | All Programs | The Microsoft. NET Framework SDK 2.0 menu option launches a preconfigured command prompt.

If you want to use the. NET command-line tool from any command prompt, you need to manually update your computer's Path variable. To do this, right-click the My Computer icon on your desktop and select the Properties menu option. From the dialog box that appears, click the Environment Variables button located below the Advanced tab. From the dialog box that appears, add the following directory listing at the end of the current Path variable in the System variable list (note that each entry must be separated by semicolons):

C:\Windows\Microsoft.NET\Framework\v2.0.40607
C:\Program Files\Microsoft Visual Studio 8\sdk\v2.0\bin

Note the list above points to the path to my current. NET 2.0 beta. Your path may vary slightly depending on the installation and version of Visual Studio and/or. NET SDK, so be sure to perform an integrity check.

Immediately after you update the Path variable, close all dialog boxes and any currently open Console windows so that you can submit your settings. You should now be able to execute csc.exe and other. NET tools from any command prompt. To test, enter the following command:

CSC-?
ILDASM-?

If you see a lot of information showing up, you can continue.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.