Show/Hide Toolbars

XSharp

Navigation: X# Documentation > X# Compiler Options

X# Compiler Options Listed Alphabetically

Scroll Prev Top Next More

The following compiler options are sorted by category. For an alphabetical list, see : X# Compiler Options Listed Alphabetically

The options in RED are not supported yet.

Option

Purpose

@

Specifies a response file.

-?

Lists compiler options to stdout.

-additionalfile

Names additional files that don't directly affect code generation but may be used by analyzers for producing errors or warnings.

-addmodule

Specifies one or more modules to be part of this assembly.

-allowdot

Controls if the DOT (".") operator should be allowed to access instance members

-allowoldstyleassignments

Allow assignments with a single Equals operator (=)

-analyzer

Run the analyzers from this assembly (Short form: /a)

-appconfig

Specify an application configuration file containing assembly binding settings

-ast

Dump the abstract syntax tree for each source file (.ast extension)

-az

Specifies that arrays are zero-based rather than one-based

-baseaddress

Specifies the preferred base address at which to load a DLL.

-checked

Specifies whether integer arithmetic that overflows the bounds of the data type will cause an exception at run time.

-checksumalgorithm

Specify the algorithm for calculating the source file checksum stored in PDB. Supported values are: SHA1 (default) or SHA256.

-codepage

Specifies the code page to use for all source code files in the compilation.

-cs

Specifies that the compiler should use case-sensitive type names

-debug -d

Instruct the compiler to emit debugging information.

-define

Defines preprocessor symbols.

-dialect

Specifies the dialect to use when compiling. The following values are supported: Core, VO, Vulcan, dBase, FoxPro, Xbase++ and Harbour. Work on the VO and Vulcan dialects has started.

-delaysign

Instructs the compiler to add the public key but to leave the assembly unsigned.

-doc

Specifies an XML file where processed documentation comments are to be written.

-enforceoverride

Enforce the use of the OVERRIDE keyword to override methods from parent classes in subclasses

-enforceself

Enforce the use of SELF: to access fields, properties and methods inside a class

-errorendlocation

Output line and column of the end location of each error

-errorreport

Sets error reporting behavior.

-filealign

Specifies the size of sections in the output file.

-fox1

Assume classes inherit from Custom class. This also controls the code generation for properties.

-fox2

Compatible FoxPro Array support

-fovf

Specifies that exceptions will be raised on invalid floating point operations  (duplicate of -ovf)

-fullpaths

Specifies the absolute path to the file in compiler output.

-help

Lists compiler options to stdout.

-highentropyva

Specifies that the executable file supports address space layout randomization (ASLR).

-i

Specifies a directory to add to the #include file search path

-initlocals

Initialize all local variables

-ins

Use implicit namespace lookup mechanism

-keycontainer

Specifies the name of the cryptographic key container.

-keyfile

Specifies the filename containing the cryptographic key.

-lb

Specifies that the compiler should generate late bound calls when necessary

-langversion

Specify language version mode: core, VO, Vulcan, Harbour, FoxPro, dBase

-lexonly

Tells the compiler to only lex the source code.

-lib

Specifies the location of assemblies referenced by means of /reference.

-link

Makes COM type information in specified assemblies available to the project.

-linkresource

Creates a link to a managed resource.

-main

Specifies the location of the Main method.

-memvar

Enable support for memory variables

-modulename

Specify the name of the source module

-namedargs

Specifies whether to allow named arguments in the parser or not.

-nostddefs

Suppresses preprocessor definitions in XSharpDefs.xh  

-ns

Specify the default namespace for the output assembly

-noconfig

Instructs the compiler not to compile with xsc.rsp.

-noinit

Suppress generation of empty $Init1() and  $Exit() functions

-nologo

Suppresses compiler banner information.

-nostdlib

Instructs the compiler not to import the standard library (mscorlib.dll).

-nowarn

Suppresses the compiler's generation of specified warnings.

-optimize

Enables/disables optimizations.

-ovf

Specifies that exceptions will be raised on overflows  (duplicate of -fovf)

-out

Specifies the output file.

-parallel

Specifies whether to use concurrent build (+).

-parseonly

Tells the compiler to only lex and parse the source code.

-pathmap

Specify a mapping for source path names output by the compiler.

-pdb

Specifies the file name and location of the .pdb file.

-platform

Specify the output platform.

-ppo

Writes preprocessor output to file

-preferreduilang

Specify a language for compiler output.

-recurse

Searches subdirectories for source files to compile.

-reference

Imports metadata from a file that contains an assembly.

-resource

Embeds a .NET Framework resource into the output file.

-ruleset

Specify a ruleset file that disables specific diagnostics.

-s

Syntax check only

-shared

Use the shared compiler

-showdefs

Show the defines that are added from the header files and their usage

-showincludes

Lists #include files in compiler output

-snk

Signs assembly with strong name key pair

-subsystemversion

Specifies the minimum version of the subsystem that the executable file can use.

-target

Specifies the format of the output file using one of five options: /target:appcontainerexe, /target:exe, /target:library, /target:module, /target:winexe, or /target:winmdobj.

-touchedfiles

Specify filename that will be updated with list of files read and written by the compiler

-undeclared

Enables the support for undeclared memory variables

-unsafe

Enables compilation of code that uses the unsafe keyword.

-usenativeversion

Prefer native resource (if any) over resources generated from managed assembly properties

-utf8output

Displays compiler output using UTF-8 encoding.

-vo1

Use Init and Axit methods in stead of Constructors and Destructors

-vo2

Initialize STRING variables, fields and DIM arrays to empty strings

-vo3

Treats All Methods As VIRTUAL

-vo4

Allows implicit numeric conversions

-vo5

Implicit CLIPPER Calling Convention for Zero-Argument Functions

-vo6

Resolves typed function pointers to PTR

-vo7

Allows compatible implicit casts and conversions

-vo8

Enables compatible preprocessor behavior

-vo9

Allows missing RETURN statements

-vo10

Enables compatible IIF behavior

-vo11

Enables Visual Objects compatible arithmetic conversions

-vo12

Enables Clipper compatible integer divisions

-vo13

Enables Visual Objects compatible string comparisons

-vo14

Insert floating point literals as FLOAT

-vo15

Allow untyped Locals and return types

-vo16

Automatically generate Clipper calling convention constructors for classes without constructor

-w

This option is not supported. use -nowarn in stead

-warn

Sets the warning level.

-warnaserror

Promotes warnings to errors.

-win32icon

Specifies an .ico file to insert into the output file.

-win32manifest

Specify a user-defined Win32 application manifest file to be embedded into a executable file.

-win32res

Specifies a Win32 resource to insert into the output file.

-wx

Treats all warnings as errors (alias for -warnaserror)

-xpp1

Classes without parent class inherit from the Abstract class