diff --git a/src/Build/Instance/ProjectInstance.cs b/src/Build/Instance/ProjectInstance.cs index fe0cdee00e6..da0ac9603d0 100644 --- a/src/Build/Instance/ProjectInstance.cs +++ b/src/Build/Instance/ProjectInstance.cs @@ -1390,13 +1390,13 @@ public void AddSdkResolvedEnvironmentVariable(string name, string value) // If the property has already been set as an environment variable, we do not overwrite it. if (_environmentVariableProperties.Contains(name)) { - _loggingContext.LogComment(MessageImportance.Low, "SdkEnvironmentVariableAlreadySet", name, value); + LogIfValueDiffers(_environmentVariableProperties, name, value, "SdkEnvironmentVariableAlreadySet"); return; } // If another SDK already set it, we do not overwrite it. else if (_sdkResolvedEnvironmentVariableProperties?.Contains(name) == true) { - _loggingContext.LogComment(MessageImportance.Low, "SdkEnvironmentVariableAlreadySetBySdk", name, value); + LogIfValueDiffers(_sdkResolvedEnvironmentVariableProperties, name, value, "SdkEnvironmentVariableAlreadySetBySdk"); return; } @@ -1412,8 +1412,18 @@ public void AddSdkResolvedEnvironmentVariable(string name, string value) ((IEvaluatorData)this) .SetProperty(name, value, isGlobalProperty: false, mayBeReserved: false, loggingContext: _loggingContext, isEnvironmentVariable: true, isCommandLineProperty: false); } + } - _loggingContext.LogComment(MessageImportance.Low, "SdkEnvironmentVariableSet", name, value); + /// + /// Helper method to log a message if the attempted value differs from the existing value. + /// + private void LogIfValueDiffers(PropertyDictionary propertyDictionary, string name, string attemptedValue, string messageResourceName) + { + ProjectPropertyInstance existingProperty = propertyDictionary.GetProperty(name); + if (existingProperty != null && !string.Equals(existingProperty.EvaluatedValue, attemptedValue, StringComparison.Ordinal)) + { + _loggingContext.LogComment(MessageImportance.Low, messageResourceName, name, attemptedValue, existingProperty.EvaluatedValue); + } } /// diff --git a/src/Build/Resources/Strings.resx b/src/Build/Resources/Strings.resx index 68b59de6ee8..95da5690fa1 100644 --- a/src/Build/Resources/Strings.resx +++ b/src/Build/Resources/Strings.resx @@ -1384,14 +1384,12 @@ Errors: {3} {StrBegin="MSB4238: "} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - - - An SDK attempted set the environment variable "{0}" to "{1}". + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + MSB4189: <{1}> is not a valid child of the <{0}> element. {StrBegin="MSB4189: "} diff --git a/src/Build/Resources/xlf/Strings.cs.xlf b/src/Build/Resources/xlf/Strings.cs.xlf index 86d6fc9c60c..026ed4209ae 100644 --- a/src/Build/Resources/xlf/Strings.cs.xlf +++ b/src/Build/Resources/xlf/Strings.cs.xlf @@ -907,20 +907,16 @@ Chyby: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Sada SDK se pokusila nastavit proměnnou prostředí {0} na {1}, která ale již byla nastavena jako proměnná prostředí. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Sada SDK se pokusila nastavit proměnnou prostředí {0} na {1}, která ale už byla nastavena jinou sadou SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Sada SDK se pokusila nastavit proměnnou prostředí {0} na {1}. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} Sadu SDK {0} se nepodařilo vyřešit pomocí překladače sady SDK {1}. {2} diff --git a/src/Build/Resources/xlf/Strings.de.xlf b/src/Build/Resources/xlf/Strings.de.xlf index 4adaf0b3973..be3c31d7318 100644 --- a/src/Build/Resources/xlf/Strings.de.xlf +++ b/src/Build/Resources/xlf/Strings.de.xlf @@ -907,20 +907,16 @@ Fehler: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Ein SDK hat versucht, die Umgebungsvariable „{0}“ auf „{1}“ festzulegen, sie wurde aber bereits als Umgebungsvariable festgelegt. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Ein SDK hat versucht, die Umgebungsvariable „{0}“ auf „{1}“ festzulegen, sie wurde aber bereits von einem anderen SDK festgelegt. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Ein SDK hat versucht, die Umgebungsvariable „{0}“ auf „{1}“ festzulegen. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK „{0}“ konnte vom SDK-Resolver „{1}“ nicht aufgelöst werden. {2} diff --git a/src/Build/Resources/xlf/Strings.es.xlf b/src/Build/Resources/xlf/Strings.es.xlf index ed841430d86..d36690c8d8b 100644 --- a/src/Build/Resources/xlf/Strings.es.xlf +++ b/src/Build/Resources/xlf/Strings.es.xlf @@ -907,20 +907,16 @@ Errores: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Un SDK intentó establecer la variable de entorno "{0}" en "{1}", pero ya se estableció como variable de entorno. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Un SDK intentó establecer la variable de entorno "{0}" en "{1}", pero ya la estableció otro SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Un SDK intentó establecer la variable de entorno "{0}" en "{1}". + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} El SDK '{0}' no se pudo resolver mediante la resolución de SDK '{1}'. {2} diff --git a/src/Build/Resources/xlf/Strings.fr.xlf b/src/Build/Resources/xlf/Strings.fr.xlf index 2a866b00d4e..cb5f6f9f57b 100644 --- a/src/Build/Resources/xlf/Strings.fr.xlf +++ b/src/Build/Resources/xlf/Strings.fr.xlf @@ -907,20 +907,16 @@ Erreurs : {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Un Kit de développement logiciel (SDK) a tenté de définir la variable d’environnement « {0} » à « {1} », alors qu'elle était déjà définie en tant que variable d'environnement. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Un Kit de développement logiciel (SDK) a tenté de définir la variable d’environnement « {0} » à « {1} », mais elle était déjà définie par un autre SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Un Kit de développement logiciel (SDK) a tenté de définir la variable d’environnement « {0} » à « {1} ». + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} Le Kit de développement logiciel (SDK) « {0} » n’a pas pu être résolu par le résolveur de SDK « {1} ». {2} diff --git a/src/Build/Resources/xlf/Strings.it.xlf b/src/Build/Resources/xlf/Strings.it.xlf index 99d4affd579..908c3afe6e0 100644 --- a/src/Build/Resources/xlf/Strings.it.xlf +++ b/src/Build/Resources/xlf/Strings.it.xlf @@ -907,20 +907,16 @@ Errori: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Un SDK ha tentato di impostare la variabile di ambiente "{0}" su "{1}" ma era già stata impostata come variabile di ambiente. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Un SDK ha tentato di impostare la variabile di ambiente "{0}" su "{1}" ma era già stata impostata da un altro SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Un SDK ha tentato di impostare la variabile di ambiente "{0}" su "{1}". + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} Il resolver SDK '{0}' non è riuscito a risolvere l'SDK '{1}'. {2} diff --git a/src/Build/Resources/xlf/Strings.ja.xlf b/src/Build/Resources/xlf/Strings.ja.xlf index 38b60d181d3..be5077cab90 100644 --- a/src/Build/Resources/xlf/Strings.ja.xlf +++ b/src/Build/Resources/xlf/Strings.ja.xlf @@ -907,20 +907,16 @@ Errors: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - SDK は環境変数 "{0}" を "{1}" に設定しようとしましたが、それは既に環境変数として設定されていました。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - SDK は環境変数 "{0}" を "{1}" に設定しようとしましたが、それは既に別の SDK によって設定されていました。 - - - - An SDK attempted set the environment variable "{0}" to "{1}". - SDK が環境変数 "{0}" を "{1}" に設定しようとしました。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK '{0}' を SDK リゾルバー '{1}' で解決できませんでした。{2} diff --git a/src/Build/Resources/xlf/Strings.ko.xlf b/src/Build/Resources/xlf/Strings.ko.xlf index e5aa1a02533..8d3b59f5ec8 100644 --- a/src/Build/Resources/xlf/Strings.ko.xlf +++ b/src/Build/Resources/xlf/Strings.ko.xlf @@ -907,20 +907,16 @@ Errors: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - SDK가 환경 변수 "{0}"을(를) "{1}"(으)로 설정하려고 했지만 이미 환경 변수로 설정되었습니다. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - SDK가 환경 변수 "{0}"을(를) "{1}"(으)로 설정하려고 했지만 이미 다른 SDK에 의해 설정되었습니다. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - SDK가 환경 변수 "{0}"을(를) "{1}"(으)로 설정하려고 했습니다. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK 확인자 '{1}'에서 SDK '{0}'을(를) 확인할 수 없습니다. {2} diff --git a/src/Build/Resources/xlf/Strings.pl.xlf b/src/Build/Resources/xlf/Strings.pl.xlf index 866d90bcd9d..663194899f7 100644 --- a/src/Build/Resources/xlf/Strings.pl.xlf +++ b/src/Build/Resources/xlf/Strings.pl.xlf @@ -907,20 +907,16 @@ Błędy: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Zestaw SDK próbował ustawić zmienną środowiskową „{0}” na „{1}”, ale została już ustawiona jako zmienna środowiskowa. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Zestaw SDK próbował ustawić zmienną środowiskową „{0}” na „{1}”, ale została już ustawiona przez inny zestaw SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Zestaw SDK próbował ustawić zmienną środowiskową „{0}” na „{1}”. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} Nie można rozpoznać zestawu SDK „{0}” przez program rozpoznawania nazw zestawu SDK „{1}”. {2} diff --git a/src/Build/Resources/xlf/Strings.pt-BR.xlf b/src/Build/Resources/xlf/Strings.pt-BR.xlf index d27c50e5464..f38690c4d33 100644 --- a/src/Build/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Build/Resources/xlf/Strings.pt-BR.xlf @@ -907,20 +907,16 @@ Erros: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Um SDK tentou definir a variável de ambiente "{0}" como "{1}", mas ela já foi definida como variável de ambiente. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Um SDK tentou definir a variável de ambiente "{0}" como "{1}", mas ela já foi definida por outro SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Um SDK tentou definir a variável de ambiente "{0}" como "{1}". + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} O SDK '{0}' não pôde ser resolvido pelo resolvedor de SDK '{1}'. {2} diff --git a/src/Build/Resources/xlf/Strings.ru.xlf b/src/Build/Resources/xlf/Strings.ru.xlf index 55d613e49cd..612f94ddbed 100644 --- a/src/Build/Resources/xlf/Strings.ru.xlf +++ b/src/Build/Resources/xlf/Strings.ru.xlf @@ -907,20 +907,16 @@ Errors: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Пакет SDK попытался настроить для переменной среды "{0}" значение "{1}", но она уже была настроена в качестве переменной среды. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Пакет SDK попытался настроить для переменной среды "{0}" значение "{1}", но она уже была настроена другим пакетом SDK. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Пакет SDK попытался настроить для переменной среды "{0}" значение "{1}". + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} Не удалось разрешить SDK "{0}" с помощью сопоставителя SDK "{1}". {2} diff --git a/src/Build/Resources/xlf/Strings.tr.xlf b/src/Build/Resources/xlf/Strings.tr.xlf index 7a5e481602b..aa8290cc5ea 100644 --- a/src/Build/Resources/xlf/Strings.tr.xlf +++ b/src/Build/Resources/xlf/Strings.tr.xlf @@ -907,20 +907,16 @@ Hatalar: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - Bir SDK "{0}" ortam değişkenini "{1}" olarak ayarlamaya çalıştı ancak bu değişken zaten bir ortam değişkeni olarak ayarlanmıştı. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - Bir SDK "{0}" ortam değişkenini "{1}" olarak ayarlamaya çalıştı ancak bu değişken zaten başka bir SDK tarafından ayarlanmıştı. - - - - An SDK attempted set the environment variable "{0}" to "{1}". - Bir SDK, "{0}" ortam değişkenini "{1}" olarak ayarlamaya çalıştı. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK '{0}', SDK çözümleyici '{1}' tarafından çözümlenemedi. {2} diff --git a/src/Build/Resources/xlf/Strings.zh-Hans.xlf b/src/Build/Resources/xlf/Strings.zh-Hans.xlf index d8da78803bc..e3e48f00b27 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hans.xlf @@ -907,20 +907,16 @@ Errors: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - SDK 尝试将环境变量 "{0}" 设置为 "{1}",但它已设置为环境变量。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - SDK 尝试将环境变量 "{0}" 设置为 "{1}",但已由另一个 SDK 设置。 - - - - An SDK attempted set the environment variable "{0}" to "{1}". - SDK 尝试将环境变量 "{0}" 设置为 "{1}"。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK 解析程序“{1}”无法解析 SDK“{0}”。{2} diff --git a/src/Build/Resources/xlf/Strings.zh-Hant.xlf b/src/Build/Resources/xlf/Strings.zh-Hant.xlf index d851b21ba23..d7de7350890 100644 --- a/src/Build/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Build/Resources/xlf/Strings.zh-Hant.xlf @@ -907,20 +907,16 @@ Errors: {3} - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set as an environment variable. - 一個 SDK 嘗試將環境變數 "{0}" 設定為 "{1}",但該變數已設定為環境變數。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" as an environment variable. - An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set by another SDK. - 一個 SDK 嘗試將環境變數 "{0}" 設定為 "{1}",但該變數已由另一個 SDK 設定。 - - - - An SDK attempted set the environment variable "{0}" to "{1}". - 一個 SDK 嘗試將環境變數 "{0}" 設定為 "{1}"。 + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + An SDK attempted to set the environment variable "{0}" to "{1}" but it was already set to "{2}" by another SDK. + SDK '{0}' could not be resolved by the SDK resolver '{1}'. {2} SDK 解析程式 '{1}' 無法解析 SDK '{0}'。{2}