Skip to content

Report TA003 when a strings resx name is used as a base name - #509

Merged
kzu merged 1 commit into
mainfrom
dev/strings-basename-collision-diagnostic
Aug 27, 2026
Merged

Report TA003 when a strings resx name is used as a base name#509
kzu merged 1 commit into
mainfrom
dev/strings-basename-collision-diagnostic

Conversation

@kzu

@kzukzu commented Aug 27, 2026

Copy link
Copy Markdown
Member

Using a resource name as the underscore base of another (e.g. SomeResource plus SomeResource_Alt, or MSG_InstallationFailed plus MSG_InstallationFailed_Alt) used to either throw during generation or emit CS0102 on the generated class.

ThisAssembly.Strings now detects that clash in both XML orders, reports TA003 with the rename-to-_Title workaround, and omits the colliding base member so generation does not crash.

Fixes#493

@kzukzu added the enhancement New feature or request label Aug 27, 2026
@kzu
kzu enabled auto-merge (rebase) August 27, 2026 05:46
@kzu

kzu commented Aug 27, 2026

Copy link
Copy Markdown
MemberAuthor

45 passed45 passed
45 passed45 passed
45 passed45 passed

🧪 Details on macOS Unix 26.5.2
🧪 Details on Ubuntu 24.04.4 LTS
🧪 Details on Microsoft Windows 10.0.26100

from retest v1.1.0 on .NET 10.0.11 with 💜 by @devlooped

@kzu
kzu merged commit df8fb46 into mainAug 27, 2026
6 checks passed
@kzu
kzu deleted the dev/strings-basename-collision-diagnostic branch August 27, 2026 05:49
This was referenced Aug 27, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Duplicated members on generated string resources class

1 participant

@kzu