CSC command set

Source: Internet
Author: User

We still need to use CSC frequently. I personally feel that sometimes vs has many inconvenient things.

C:/> CSC/help | more
Microsoft (r) Visual C # compiler version 7.00.9254 [CLR version v1.0.2914]
Copyright (c) Microsoft Corp 2000-2001. All rights reserved.

Visual C # compiler options

-Output file-
/Out: <File> output file name (if not specified, it is derived from the first source file)
/Target: the console executable file generated by EXE (default) (Abbreviation:/T: exe)
/Target: winexe to generate windows executable files (Abbreviation:/T: winexe)
/Target: Library generation Library (Abbreviation:/T: Library)
/Target: module that can be added to other assembly (Abbreviation:/T: module)
/Define: <symbol list> define Conditional compilation symbols (Abbreviation:/D)
/DOC: <File> the XML file to be generated

-Input file-
/Recurse: <wildcard> according to the wildcard specification, including all files in the current directory and subdirectory



/Reference: <file list> reference metadata from the specified Assembly file (Abbreviation:/R)
/Addmodule: <file list> link the specified module to this Assembly

-Resource-
/Win32res: <File> specify the Win32 resource file (. Res)
/Win32icon: <File> use this icon to output
/Resource: <Resource Information> embed a specified resource (Abbreviation:/RES)
/Linkresource: <Resource Information> link the specified resource to this Assembly (Abbreviation:/linkres)

-Code Generation-
/Debug [+ |-] sends debugging information
/Debug: {full | pdbonly} specifies the debugging type ("full" is the default type, you can set the debugging program
Attach to positive
In the running program)
/Optimize [+ |-] Enable optimization (Abbreviation:/O)
/Incremental [+ |-] Enable incremental compilation (Abbreviation:/incr)

-Errors and warnings-
/Warnaserror [+ |-] treats the warning as an error
/Warn: Set the warning level (0-4) (Abbreviation:/W)
/Nowarn: <warning list> disable specified warning information



/Reference: <file list> reference metadata from the specified Assembly file (Abbreviation:/R)
/Addmodule: <file list> link the specified module to this Assembly

-Resource-
/Win32res: <File> specify the Win32 resource file (. Res)
/Win32icon: <File> use this icon to output
/Resource: <Resource Information> embed a specified resource (Abbreviation:/RES)
/Linkresource: <Resource Information> link the specified resource to this Assembly (Abbreviation:/linkres)

-Code Generation-
/Debug [+ |-] sends debugging information
/Debug: {full | pdbonly} specifies the debugging type ("full" is the default type, you can set the debugging program
Attach to positive
In the running program)
/Optimize [+ |-] Enable optimization (Abbreviation:/O)
/Incremental [+ |-] Enable incremental compilation (Abbreviation:/incr)

-Errors and warnings-
/Warnaserror [+ |-] treats the warning as an error
/Warn: Set the warning level (0-4) (Abbreviation:/W)
/Nowarn: <warning list> disable specified warning information



-Language-
/Checked [+ |-] generates an overflow check
/Unsafe [+ |-] Allow "insecure" code

-Miscellaneous-
@ <File> Read the response file for more options
/Help displays the usage information (Abbreviation :/?)
/Nologo cancel compiler copyright information
/Noconfig do not automatically include the CSC. RSP File

-Advanced-
/Baseaddress: <address> base address of the database to be generated
/Bugreport: <File> Create an "Error Report" File
/CodePage: Specifies the code page used to open the source file.

/Utf8output UTF-8 encode the output compiler message
/Main: <type> specifies the type of the entry point (ignore all other possible entry points)
(Abbreviation:
/M)
/Fullpaths compiler generates a fully qualified path
/Filealign: Specifies the alignment for the output file section.
/Nostdlib [+ |-] does not reference the standard library (mscorlib. dll)
/Lib: <file list> specifies the additional directory to be referenced in the search.

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.