From 7910cf6806cd7199a9ad5a49c550a03a6fde9315 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 19:56:26 +0000 Subject: [PATCH 1/2] Initial plan From d62554640f1cad028d9f3f5db3dfcb5a7cf227db Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 4 Aug 2025 20:07:47 +0000 Subject: [PATCH 2/2] Fix Deterministic compiler option default value documentation Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com> --- .../language-reference/compiler-options/code-generation.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/csharp/language-reference/compiler-options/code-generation.md b/docs/csharp/language-reference/compiler-options/code-generation.md index 5842b944eb6f9..dcffff9dd05f5 100644 --- a/docs/csharp/language-reference/compiler-options/code-generation.md +++ b/docs/csharp/language-reference/compiler-options/code-generation.md @@ -87,7 +87,11 @@ Causes the compiler to produce an assembly whose byte-for-byte output is identic true ``` -By default, compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID (a . Basically it is a GUID that uniquely identifies the module and version.) that is generated from random numbers. You use the `` 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: +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. + +When deterministic compilation is disabled (`false`), compiler output from a given set of inputs is unique, since the compiler adds a timestamp and an MVID (a . Basically it is a GUID that uniquely identifies the module and version.) that is generated from random numbers. + +You use the `` 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: - The sequence of command-line parameters. - The contents of the compiler's .rsp response file.