Localize AbsolutePath validation messages#13115
Merged
JanProvaznik merged 3 commits intodotnet:mainfrom Feb 6, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds localization infrastructure to Microsoft.Build.Framework so AbsolutePath validation errors can come from resources instead of hard-coded English strings.
Changes:
- Added
Resources/Strings.resxand aFrameworkResourcesloader for Framework assembly resources. - Updated
AbsolutePath.ValidatePath()to throw using resource-based strings. - Added Framework XLF files for multiple locales and adjusted task-environment drivers’ Wave18_4 opt-out condition.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Framework/Resources/xlf/Strings.zh-Hant.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.zh-Hans.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.tr.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.ru.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.pt-BR.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.pl.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.ko.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.ja.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.it.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.fr.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.es.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.de.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/xlf/Strings.cs.xlf | Adds Framework locale XLF entries for AbsolutePath validation messages |
| src/Framework/Resources/Strings.resx | Introduces the Framework resource strings for AbsolutePath validation |
| src/Framework/Resources/AssemblyResources.cs | Adds FrameworkResources helper to load localized strings |
| src/Framework/PathHelpers/AbsolutePath.cs | Switches validation exceptions to use FrameworkResources strings |
| src/Framework/Microsoft.Build.Framework.csproj | Embeds Resources/Strings.resx with the expected logical name |
| src/Build/BackEnd/TaskExecutionHost/MultiThreadedTaskEnvironmentDriver.cs | Adjusts Wave18_4 opt-out path handling logic |
| src/Build/BackEnd/TaskExecutionHost/MultiProcessTaskEnvironmentDriver.cs | Adjusts Wave18_4 opt-out path handling logic |
src/Build/BackEnd/TaskExecutionHost/MultiThreadedTaskEnvironmentDriver.cs
Outdated
Show resolved
Hide resolved
src/Build/BackEnd/TaskExecutionHost/MultiProcessTaskEnvironmentDriver.cs
Outdated
Show resolved
Hide resolved
de42c44 to
8bb486d
Compare
Member
Author
|
drafting because it depends on #13120 and copilot has good design points |
8bb486d to
ae833de
Compare
ae833de to
773c540
Compare
Fixes dotnet#13114 - Add localization infrastructure to Microsoft.Build.Framework assembly - Create Resources/Strings.resx with PathMustNotBeNullOrEmpty and PathMustBeRooted strings - Add FrameworkResources class (in AssemblyResources.cs) to access resources Note: Class named FrameworkResources to avoid InternalsVisibleTo conflicts - Update AbsolutePath.cs to use localized strings - Add xlf translation files for all supported languages - Add tests with [UseInvariantCulture] to verify error messages
773c540 to
1d035a3
Compare
Member
Author
|
exp insertion does not report localizing as a perf regression |
Member
Author
|
2 reviewers wanted |
AR-May
approved these changes
Feb 6, 2026
SimaTian
approved these changes
Feb 6, 2026
JanProvaznik
added a commit
to JanProvaznik/msbuild
that referenced
this pull request
Feb 25, 2026
Add localization infrastructure to Microsoft.Build.Framework for AbsolutePath validation messages. ## Changes - Created Resources/Strings.resx with localized messages for path validation - Created Resources/AssemblyResources.cs (FrameworkResources class) to load resources - Updated AbsolutePath.ValidatePath() to use localized strings Closes dotnet#13114
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add localization infrastructure to Microsoft.Build.Framework for AbsolutePath validation messages.
Changes
Closes #13114