You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Style config sync overwrites repo-specific .gitattributes rules, and the only escape is opting out of all syncing #68
_KtsuSyncStyleConfigFiles (Sdk/Sdk.targets, origin/main bafee81) copies the package's gitattributes over the consumer's root .gitattributes before every build. A rule a repository adds for its own file types is erased by the next build.
The only escape is <KtsuSyncStyleConfigFiles>false</KtsuSyncStyleConfigFiles>. That turns off syncing for .editorconfig, .gitignore, and .runsettings too, so a repository has to give up every shared default to keep one line.
Failure scenario
ktsu-dev/ImageGui commits binary test fixtures with a custom extension (.imagegui, a zip archive).
It adds *.imagegui binary to the root .gitattributes, so Git never normalizes line endings in them.
The next dotnet build restores the SDK's copy and the rule is gone. The fixtures are safe only because Git's text=auto detection happens to see NUL bytes in them.
ImageGui now keeps the rule in tests/.gitattributes to survive the sync (ktsu-dev/ImageGui#50). That works for this case, but it hides a repository-wide rule in a subfolder.
The same problem applies to .gitignore and .editorconfig additions.
Suggested fix
Let a repository extend each synced file instead of replacing it. For example:
Keep a marked section that the sync preserves, such as everything below a # --- repo-specific --- comment.
Or append a sibling file such as .gitattributes.local (or .gitignore.local) to the synced file.
A per-file opt-out (for example KtsuSyncGitAttributes=false) would be a smaller improvement, since it at least keeps the other shared defaults.
Acceptance criteria
A repository can add its own .gitattributes rules at the root, and they survive a build.
The SDK's shared rules still update when the package changes.
The README's "Style/config file sync" section documents how to extend a synced file.
Priority: Medium. Every build erases repo-specific rules from the synced .gitattributes, .gitignore and .editorconfig. The only escape turns off syncing for all four files. ImageGui has already had to move a repository-wide rule into a subfolder to work around it (ktsu-dev/ImageGui#50). There is a workaround, so this isn't High.
Area / suggested assignment:Sdk/Sdk.targets, the _KtsuSyncStyleConfigFiles target, plus the README's "Style/config file sync" section. A per-file opt-out is a small first step. The .local sibling-file merge is the fuller fix, and it needs a design decision on the convention before any code is written.
Activity
matt-edmondson commentedon Sep 30, 2026
Triage
.gitattributes,.gitignoreand.editorconfig. The only escape turns off syncing for all four files. ImageGui has already had to move a repository-wide rule into a subfolder to work around it (ktsu-dev/ImageGui#50). There is a workaround, so this isn't High.Sdk/Sdk.targets, the_KtsuSyncStyleConfigFilestarget, plus the README's "Style/config file sync" section. A per-file opt-out is a small first step. The.localsibling-file merge is the fuller fix, and it needs a design decision on the convention before any code is written.Generated by Claude Code