Repository navigation
|
What is expected relation between content of automatically generated source files and user display language used in build?
|
Answered by
vst121
Feb 3, 2026
Replies: 1 comment 3 replies
|
Content can not depend on user display language. Automatically generated source files should be consistent and reproducible across different machines and environments, regardless of the user’s display language. If generated content varied based on locale, it would break reproducible builds and could introduce subtle bugs. Comments or metadata that appear to vary with language should be either neutralized or excluded from reproducible outputs. |
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You’re right that MSBuild has historically emitted localized comments into generated source files (including AssemblyInfo.cs), and your example from WriteCodeFragment is accurate. There does not appear to be an explicit statement in MSBuild documentation that forbids localized content in generated source files.
My point is based on documented goals and guidance around reproducible / deterministic builds, rather than a single rule targeting comments specifically.
Some relevant references:
.NET deterministic builds
Microsoft documents that deterministic builds aim to ensure that the same inputs produce the same outputs, byte-for-byte:
https://learn.microsoft.com/dotnet/csharp/language-ref…