Current location - Quotes Website - Signature design - C# compiles and generates dll files with command line.
C# compiles and generates dll files with command line.
C# compiles programs with csc.exe, and csc generates Dll files with /target:library (abbreviation: /t:library) parameters.

Other parameters are as follows:

Visual C# compiler options

-Output file-

/out:& lt; File > specifies the output file name (default: the basic name of the file containing the main class or the first file)

/target:exe generates console executable file (default) (abbreviation: /t:exe)

/target:winexe generates Windows executable file (abbreviation: /t:winexe)

/target:library generating library (abbreviation: /t:library)

/target:module generates modules (abbreviation: /t:module) that can be added to other assemblies.

/target:Appcontainerexe generates an appcontainer executable file (abbreviation: /t:appcontainerexe).

/target:winmdobj generates the Windows runtime intermediate file (abbreviation: /t:winmdobj) used by WinMDExp.

/doc:& lt; File > XML document file to be generated.

/platform: < string > restrict the platform on which this code can run: x86, Itanium, x64, arm, anycpu 32-bit preferred or anycpu. The default value is anycpu.

-Input file-

/recurse:& lt; Wildcard > according to the wildcard specification, all files in the current directory and subdirectories are included.

/reference:& lt; Alias > = < file > uses the given alias (abbreviation: /r) to refer to metadata in the specified assembly file.

/reference:& lt; File list > references metadata in the specified assembly file (abbreviation: /r)

/add module:& lt; File list > links the specified module to this assembly.

/link:& lt; File list > Metadata embedded in the specified interop assembly file (abbreviation: /l)

-Resources-

/win32 RES:& lt; File > specifies the Win32 resource file (. res)。

/win32 icon:& lt; File > use this icon to output.

/win32 manifest:& lt; File > specifies the Win32 manifest file (. xml)。

/now32manifest Win32 does not include the default win 32 manifest.

/resource:& lt; Resource information > embeds the specified resource (abbreviation: /res)

/link resource:& lt; Resource information > links the specified resource to this assembly (abbreviation: /linkres)

Resinfo's format is

-Code generation-

/debug[+|-] sends debugging information.

/debug: {full | pdbunly} specifies the debugging type ("full" is the default type, and the debugger can be attached to the running program).

/optimize[+|-] Enable optimization (abbreviation: /o)

-Errors and warnings-

/warner error [+|-] Reports all warnings as errors.

/warna serror[+|-]:& lt; Warning list > report specific warnings as errors.

/warn:& lt; N> Set the warning level (0-4) (abbreviation: /w)

/nowarn:& lt; Warning list > disable specific warning messages

-Language-

/checked[+|-] Generate overflow check

/unsafe[+|-] Allow "unsafe" code

/define:& lt; Symbol list > define conditional compilation symbols (abbreviation: /d)

/lang version:& lt; String > specifies the language version mode: ISO- 1, ISO-2, 3, 4, 5 or default.

-Safe-

/delaysign[+|-] only uses the public * * * part of the strong name key to delay the signing of the assembly.

/keyfile:& lt; File > specify a strong name key file.

/key container:& lt; String > specifies a strong name key container.

/highentropyva [+|-] Enable ASLR with high average information.

-Miscellaneous-

@< file > Please read the response file for more options.

/help displays this usage information (abbreviation:/? )

/nolog cancels compiler copyright information

/noconfig does not automatically include CSC. RSP file.

-Advanced-

/base address:& lt; Address > the base address of the library to be generated.

/bug report:& lt; File > create error report file

/code page:& lt; N> specifies the code page to use when opening the source file.

/UTF 8output outputs compiler messages in utf8 encoding format.

/main:& lt; Type > specifies the type containing the entry point (all other possible entry points are ignored) (abbreviation: /m)

The /fullpaths compiler generates fully qualified paths.

/file align:& lt; N> specifies the alignment used to output file sections.

/pdb:& lt; File > specifies the file name of debugging information (default: use. Pdb extension).

/errorendlocation outputs the row and column where each error ends.

/Preferred specifies the preferred output language name.

/nostdlib[+|-] does not reference the standard library (mscorlib.dll)

/subsystem version:& lt; String > specifies the subsystem version of this assembly.

/lib:& lt; File list > specifies an additional directory in which to search for references.

/error report:& lt; String > specifies how to handle internal compiler errors: prompt, send, queue, or none. The default value is queue.

/appconfig:& lt; File > specifies the application configuration file that contains the assembly binding settings.

/moduleassemblyname:& lt; String > the name of the assembly to which the module belongs