How to configure system environment variables of C #

Source: Internet
Author: User

Before using any. net sdk command line tool (including the C # compiler), you need to configure the development computer to identify their existence. The simplest method is to use the Start | All Programs | Visual Studio 2005 | Visual Studio Tools menu option to Start the pre-configured Visual Studio command prompt. This specific console can automatically initialize necessary environment variables without performing any operations. (Visual Studio. NET 2003 users need to start their respective command prompts ).

Note: If you do not have Visual Studio, but have installed the. NET Framework SDK, you can Start the pre-configuration command prompt from the Start | All Programs | Microsoft. NET Framework SDK 2.0 menu option.

If you want to use the. NET command line tool from any command prompt, You need to manually update the Path variable of the computer. In practice, right-click the My Computer icon on the desktop and select the Properties menu option. In the displayed dialog box, click Environment Variables under the Advanced tab. In the displayed dialog box, add the following directory list at the end of the current Path variable in the System Variable list box (note that the entries 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 that the above list points to my current. NET 2.0 test version path. Your path may vary slightly depending on the installation and version of Visual Studio and/or. net sdk. Therefore, ensure that you perform integrity check.

After updating the Path variable, close all the dialog boxes and any Console windows that are currently open to submit the settings. You should be able to execute csc.exe and other. NET tools from any command prompt. To perform a test, enter the following command:

Csc -?

Ildasm -?

If you see a large amount of information displayed, you can continue.

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.