Udostępnij za pośrednictwem


CommandLineArguments Class

Definition

The base class for representing command line arguments to a Microsoft.CodeAnalysis.CommonCompiler.

public ref class CommandLineArguments abstract
public abstract class CommandLineArguments
type CommandLineArguments = class
Public MustInherit Class CommandLineArguments
Inheritance
CommandLineArguments
Derived

Properties

AdditionalFiles

A set of additional non-code text files that can be used by analyzers.

AnalyzerConfigPaths

A set of paths to EditorConfig-compatible analyzer config files.

AnalyzerReferences

References to analyzers supplied on the command line.

AppConfigPath

An absolute path of the app.config file or null if not specified.

BaseDirectory

Directory used to resolve relative paths stored in the arguments.

ChecksumAlgorithm

Hash algorithm to use to calculate source file debug checksums and PDB checksum.

CompilationName

Compilation name or null if not specified.

CompilationOptions

Options to the Compilation.

CompilationOptionsCore
DisplayHelp

If true, append the command line help during Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter,System.Threading.CancellationToken)

DisplayLangVersions

If true, prepend the compiler-supported language versions during Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter,System.Threading.CancellationToken)

DisplayLogo

If true, prepend the command line header logo during Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter,System.Threading.CancellationToken).

DisplayVersion

If true, append the compiler version during Microsoft.CodeAnalysis.CommonCompiler.Run(System.IO.TextWriter,System.Threading.CancellationToken)

DocumentationPath

Absolute path of the documentation comment XML file or null if not specified.

EmbeddedFiles

A set of files to embed in the PDB.

EmitOptions

Gets the emit options.

EmitPdb

True to emit PDB information (to a standalone PDB file or embedded into the PE file).

EmitPdbFile

Returns true if the PDB is generated to a PDB file, as opposed to embedded to the output binary and not generated at all.

Encoding

Encoding to be used for source files or 'null' for autodetect/default.

ErrorLogOptions

Options controlling the generation of a SARIF log file containing compilation or analysis diagnostics, or null if no log file is desired.

ErrorLogPath

Options controlling the generation of a SARIF log file containing compilation or analysis diagnostics, or null if no log file is desired.

Errors

Errors while parsing the command line arguments.

GeneratedFilesOutputDirectory

Absolute path of the directory to place generated files in, or null to not emit any generated files.

InteractiveMode

Drop to an interactive loop. If a script is specified in SourceFiles executes the script first.

KeyFileSearchPaths

Sequence of absolute paths used to search for key files.

ManifestResources

Resources specified as arguments to the compilation.

MetadataReferences

References to metadata supplied on the command line. Includes assemblies specified via /r and netmodules specified via /addmodule.

NoWin32Manifest

If true, do not embed any Win32 manifest, including one specified by Win32Manifest or any default manifest.

OutputDirectory

Absolute path of the output directory (could only be null if there is an error reported).

OutputFileName

Name of the output file or null if not specified.

OutputRefFilePath

Path of the output ref assembly or null if not specified.

ParseOptions

Options to the CommandLineParser.

ParseOptionsCore
PathMap

A list of pairs of paths. This stores the value of the command-line compiler option /pathMap:X1=Y1;X2=Y2... which causes a prefix of X1 followed by a path separator to be replaced by Y1 followed by a path separator, and so on for each following pair.

PdbPath

Path of the PDB file or null if same as output binary path with .pdb extension.

PreferredUILang

Specify the preferred output language name.

PrintFullPaths

If true, prints the full path of the file containing errors or warnings in diagnostics.

ReferencePaths

Sequence of absolute paths used to search for references.

ReportAnalyzer
ReportInternalsVisibleToAttributes

Report additional information related to InternalsVisibleToAttributes for all assemblies the compiler sees in this compilation.

RuleSetPath

Absolute path of the .ruleset file or null if not specified.

ScriptArguments

Arguments following a script file or separator "--". Null if the command line parser is not interactive.

SkipAnalyzers
SourceFiles

Source file paths.

SourceLink

Path of the file containing information linking the compilation to source server that stores a snapshot of the source code included in the compilation.

SourcePaths

Sequence of absolute paths used to search for sources specified as #load directives.

TouchedFilesPath

Full path of a log of file paths accessed by the compiler, or null if file logging should be suppressed.

Utf8Output

If true, use UTF-8 for output.

Win32Icon

The path to a .ico icon file.

Win32Manifest

The path to a Win32 manifest file to embed into the output portable executable (PE) file.

Win32ResourceFile

The path to a Win32 resource.

Methods

GetOutputFilePath(String)

Returns a full path of the file that the compiler will generate the assembly to if compilation succeeds.

GetPdbFilePath(String)

Returns a full path of the PDB file that the compiler will generate the debug symbols to if EmitPdbFile is true and the compilation succeeds.

ResolveAnalyzerReferences(IAnalyzerAssemblyLoader)

Resolves analyzer references stored in AnalyzerReferences using given file resolver.

ResolveMetadataReferences(MetadataReferenceResolver)

Resolves metadata references stored in MetadataReferences using given file resolver and metadata provider.

Applies to