Skip to content

Commit 07934ac

Browse files
CopilotBillWagner
andauthored
Fix Deterministic compiler option default value documentation (#47725)
* Initial plan * Fix Deterministic compiler option default value documentation Co-authored-by: BillWagner <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: BillWagner <[email protected]>
1 parent 782b0bd commit 07934ac

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/csharp/language-reference/compiler-options/code-generation.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ Causes the compiler to produce an assembly whose byte-for-byte output is identic
8787
<Deterministic>true</Deterministic>
8888
```
8989

90-
By default, compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID (a <xref:System.Reflection.Module.ModuleVersionId%2A?displayProperty=nameWithType>. Basically it is a GUID that uniquely identifies the module and version.) that is generated from random numbers. You use the `<Deterministic>` option to produce a *deterministic assembly*, one whose binary content is identical across compilations as long as the input remains the same. In such a build, the timestamp and MVID fields will be replaced with values derived from a hash of all the compilation inputs. The compiler considers the following inputs that affect determinism:
90+
For modern .NET projects, deterministic compilation is enabled by default (the `Deterministic` property defaults to `true`). When deterministic compilation is enabled, the timestamp and MVID fields are replaced with values derived from a hash of all the compilation inputs, ensuring identical binary output for identical inputs.
91+
92+
When deterministic compilation is disabled (`<Deterministic>false</Deterministic>`), compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID (a <xref:System.Reflection.Module.ModuleVersionId%2A?displayProperty=nameWithType>. Basically it is a GUID that uniquely identifies the module and version.) that is generated from random numbers.
93+
94+
You use the `<Deterministic>` option to produce a *deterministic assembly*, one whose binary content is identical across compilations as long as the input remains the same. The compiler considers the following inputs that affect determinism:
9195

9296
- The sequence of command-line parameters.
9397
- The contents of the compiler's .rsp response file.

0 commit comments

Comments
 (0)