Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The cmd command compiles the C # source code using the C # compiler that comes with window

Shulou Source: shulou.com Published: 2022-06-03 06:08:39 11月24日 Update

1. Write the C # source file (.cs).

2. Find the C # compiler csc.exe that comes with window. The general path is C:\ Windows\ Microsoft.NET\ Framework\ v4.0.30319 or C:\ Windows\ Microsoft.NET\ Framework64\ v4.0.30319

3. Run cmd as an administrator, otherwise there will be an error denying access to resources. Then run the following command to compile.

4. You can also configure system variables. Use the shortcut key win+break to open the system properties page, and then follow the steps in the figure below. Note that if the path environment variable already exists, it is split with ";" and continues to be added later.

5. Run it directly under the name of csc, as shown below

Tags: Run compile variable system command compiler primitive property shortcut step source file environment administrator resource path identity error page management Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple MySQL Linux Docker Microsoft