Visual C # Language Concept
Generate from the command line
You can call the C # compiler on the command line by typing the name (CSC.exe) on the command line. If you want to call CSC.exe from any subdirectories on your computer, you may need to adjust the path.
This topic provides more information about the following:
Differential command line example between Vcvars32.bat C # compiler and C compiler output
Run vcvars32.bat
Vcvars32.bat Sets the appropriate environment variable to enable the command line compilation.
Run vcvars32.bat
At the command prompt, change to the installed / bin subdirectory. Run vcvars32.bat by typing VCVARS32.
WARNING VCVARS32.BAT varies depending on the computer. Do not replace the lost or damaged vcvars32.bat file with vcvars32.bat on other computers. Run the installer to replace the lost file.
For more information on vcvars32.bat, see the following Knowledge Base article:
Q248802: vcvars32.bat generates out of environment Message
If the Visual Studio current version is installed on a computer already having an earlier version of the Visual Studio, you should not run from different versions of Vcvars32.bat in the same command window.
Difference between C # compiler and C compiler output
As the result of calling the C # compiler, no object (.Obj) file is created; create an output file directly. Therefore, the C # compiler does not require a linker.
Command line grammar rules
When explaining the parameters given on the operating system command line, the C # compiler code uses the following rules:
The parameters are separated by blank, and the blank can be a space or a tab. ^ Character (^) is not recognized as an escap or separator. This character is completely processed by the command line analyzer of the operating system before being passed to the Argv array of the program. Regardless of whether there is a blank, the string included in the double quotes ("string") is interpreted as a single parameter. Strings with quotation marks can be embedded in parameters. The double quotes (/ ") in front of the front is interpreted as the primary double quotes character ("). The backslash is explained by its original, unless they are tight before double quotes. If an even aversion is double quoted, then a backslash in each pair of backslash is placed in the Argv array, and the dual quotes are interpreted as a character string separator. If the odd substrate is followed by double quotes, then a backslash in the backslash is placed in the argv array, the double quotes are "escape" by the remaining backslash, so that the original double quotes (") Place in the Argv array.
Command line example