Export (0) Print
Expand All

/incremental (Enable Incremental Compilation)

Visual Studio .NET 2003
/incremental[+ | -]

Remarks

The /incremental compiler option enables the incremental compiler, which compiles only those methods that have changed since the last compilation. Information about the state of the previous compilation is stored in the following files, which are created by the compiler:

output_file_name.dbg
When compiling with /debug, the status of debug information is stored in the program database (.pdb file).
output_file_name.extension.incr
Information about the status of the compilation, other than debug information, is stored in a .incr file.

The first time you use /incremental, the .incr and .pdb files are updated and all subsequent compilations will be incremental. Changing the compiler options from the previous /incremental compilation will cause a full rebuild of the .incr and .pdb files.

If the compiler detects many changes since the last incremental build, it may perform a full build, as a full build would be at least as efficient as an incremental build. If the compiler cannot find the project's .pdb or .incr files, a full rebuild will occur.

In an incremental build, /doc is ignored. To ensure that your documentation file is up to date, build with /incremental-.

By default, /incremental- is in effect. Specifying /incremental is the same as specifying /incremental+.

Output files created with the /incremental option may be larger than those created with incremental compilation disabled. Because the output files can be larger, you should use /incremental- in the final build of your output file.

/incremental will speed compilation on projects with many, smaller files, and will have little or no speed improvement on projects with fewer, large files.

To set this compiler option in the Visual Studio development environment

  1. Open the project's Property Pages dialog box. For details, see Setting Visual C# Project Properties.
  2. Click the Configuration Properties folder.
  3. Click the Advanced property page.
  4. Modify the Incremental build property.

To set this compiler option programmatically

See IncrementalBuild Property.

Example

Compile in.cs using the incremental compiler:

csc /incremental in.cs

See Also

C# Compiler Options

Show:
© 2014 Microsoft