Microsoft.UI.Xaml.Markup.Compiler.Executable uses the localized language instead of English when generating cs files

Author: YexuanXiaoCreated Sep 11, 2026Updated Sep 20, 2026
Labelsbugarea-XamlCompilerarea-Localizationteam-Core

Describe the bug

The current WinUI3 repository contains .cs files generated by Microsoft.UI.Xaml.Markup.Compiler.Executable from .tt templates, and these files are not ignored by .gitignore. Every time .tt is modified, the generated .cs is uploaded to the repository. However, the comments in the files generated by Microsoft.UI.Xaml.Markup.Compiler.Executable use localized comments instead of English, so if someone uses a non-English Visual Studio to generate the .cs files, all .cs files will be updated to the localized language, causing unexpected git modifications.

Why is this important?

People who use a non-English Visual Studio cannot correctly generate the corresponding .cs files.

Steps to reproduce the bug

Set Visual Studio to a non-English language, open XamlCompiler.sln, and build Microsoft.UI.Xaml.Markup.Compiler.Executable.

Actual behavior

The generated files should always use English.

Expected behavior

No response

Screenshots

No response

NuGet package version

none

Windows version

No response

Additional context

// // This code was generated by a tool. // Runtime Version: 18.0.0.0 //
// Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. //

Source: microsoft/microsoft-ui-xaml