[xibuild] Handle "incorrectly" cased msbuild property names (#6202)
msbuild property names are case insensitive. While generating the custom app.config, in `SetToolsetProperty(..)` we try to update the property if it already exists. But the name lookup was case sensitive, thus causing the lookup to fail, resulting in two entries for the same property name differing only in case. Eg. `MSBuildSDKsPath` vs `MSBuildSdksPath`. Fixed to ignore case. Fixes https://github.com/mono/mono/issues/14765 .
This commit is contained in:
Родитель
7d67e0585c
Коммит
55c4073cb3
|
@ -206,7 +206,7 @@ namespace xibuild {
|
|||
SetToolsetProperty ("MSBuildExtensionsPath32", MSBuildExtensionsPath);
|
||||
SetToolsetProperty ("MSBuildExtensionsPath64", MSBuildExtensionsPath);
|
||||
SetToolsetProperty ("RoslynTargetsPath", Path.Combine (MSBuildBin, "Roslyn"));
|
||||
SetToolsetProperty ("MSBuildSdksPath", MSBuildSdksPath);
|
||||
SetToolsetProperty ("MSBuildSDKsPath", MSBuildSdksPath);
|
||||
|
||||
dstXml.Save (targetConfigFile);
|
||||
return;
|
||||
|
@ -228,7 +228,8 @@ namespace xibuild {
|
|||
if (string.IsNullOrEmpty (value))
|
||||
return;
|
||||
|
||||
var valueAttribute = toolsets.SelectSingleNode ($"property[@name='{name}']/@value");
|
||||
// MSBuild property names are case insensitive
|
||||
var valueAttribute = toolsets.SelectSingleNode ($"property[translate(@name, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')='{name.ToLowerInvariant()}']/@value");
|
||||
if (valueAttribute != null) {
|
||||
valueAttribute.Value = value;
|
||||
} else {
|
||||
|
|
Загрузка…
Ссылка в новой задаче