diff --git a/Directory.Packages.props b/Directory.Packages.props index 579bcf4f1c30..1d941c1212fd 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -45,6 +45,7 @@ + @@ -99,6 +100,7 @@ + diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index af0a1bcdb529..e2c56740f3e9 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -234,6 +234,10 @@ https://github.com/dotnet/runtime d5e636923fb1670597b536fa8a6fce4a06822e87 + + https://github.com/dotnet/runtime + d5e636923fb1670597b536fa8a6fce4a06822e87 + https://github.com/dotnet/runtime d5e636923fb1670597b536fa8a6fce4a06822e87 @@ -652,5 +656,9 @@ d304c5f6f15bcd4f34f1841b33870cfab88e6937 + + https://github.com/dotnet/runtime + e77011b31a3e5c47d931248a64b47f9b2d47853d + diff --git a/eng/Versions.props b/eng/Versions.props index 99097d54a0ac..ed1edd22dac9 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -27,6 +27,7 @@ compiler API targeted by analyzer assemblies. This is mostly an issue on source-build as in that build mode analyzer assemblies always target the live compiler API. --> true + 6.0.1 30 @@ -161,6 +162,7 @@ because in those cases, Visual Studio is providing System.Text.Json, and we should work with whichever version it ships. --> 8.0.4 9.0.0-rc.2.24427.10 + 9.0.0-rc.2.24427.10 diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf index c183619d1c2d..31aff8530cda 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.cs.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Možnosti {0} a {1} nelze použít společně. Jednu z možností odeberte. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Možnost {0} se nedá použít, pokud je v global.json zadaná verze úlohy. Odeberte možnost {0} nebo odeberte element workloadVersion z {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Kontrolují se aktualizované manifesty úloh. + Kontroluje se aktualizovaná verze úlohy. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Nepovedlo se nainstalovat verzi úlohy {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf index 9a0ef4029414..adc78e04f00d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.de.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Die Optionen {0} und {1} können nicht zusammen verwendet werden. Entfernen Sie eine der Optionen. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Die Option {0} kann nicht verwendet werden, wenn die Workloadversion in global.json angegeben ist. Entfernen Sie die Option {0}, oder entfernen Sie das WorkloadVersion-Element aus {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Es wird nach aktualisierten Workloadmanifesten gesucht. + Es wird nach einer aktualisierten Workloadversion gesucht. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Fehler beim Installieren der Workloadversion {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf index 1c36327c0f7e..718410235e84 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.es.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + No se pueden usar las opciones {0} y {1} juntas. Quite una de las opciones. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + No se puede usar la opción {0} cuando se especifica la versión de la carga de trabajo en global.json. Quite la opción {0} o quite el elemento "workloadVersion" de {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Comprobando si hay manifiestos de carga de trabajo actualizados. + Comprobando la versión de las cargas de trabajo actualizadas. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + No se pudo instalar la versión de carga de trabajo {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf index 262d1fd57515..d8f527ee4ac9 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.fr.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Impossible d’utiliser les options {0} et {1} ensemble. Supprimez l’une des options. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Impossible d’utiliser l’option {0} lorsque la version de la charge de travail est spécifiée dans global.json. Supprimez l’option {0} ou supprimez l’élément « workloadVersion » de {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Recherche de manifestes de charge de travail mis à jour + Vérification de la version mise à jour de la charge de travail. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Échec de l’installation de la version de charge de travail {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf index 08486a0f1f6f..1f36e013fd53 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.it.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Impossibile utilizzare contemporaneamente le opzioni {0} e {1}. Rimuove una delle opzioni. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Non è possibile usare l'opzione {0} quando la versione del carico di lavoro è specificata in global.json. Rimuovere l'opzione {0} o rimuovere l'elemento 'workloadVersion' da {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Verifica della disponibilità di manifesti del carico di lavoro aggiornati. + Verifica della disponibilità di versioni dei carichi di lavori aggiornate. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Non è stato possibile installare la versione del carico di lavoro {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf index 69625b03d4a3..e931d647e220 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ja.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + {0} オプションと {1} オプションを同時に使用することはできません。いずれかのオプションを削除してください。 @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + ワークロードのバージョンが global.json で指定されている場合、{0} オプションは使用できません。{0} オプションを削除するか、{1} から 'workloadVersion' 要素を削除してください。 "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - 更新されたワークロード マニフェストを確認しています。 + 更新されたワークロード バージョンを確認しています。 @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + ワークロード バージョン {0} をインストールできませんでした: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf index 67bc55e9f64d..ba3e44cec620 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ko.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + {0} 및 {1} 옵션을 함께 사용할 수 없습니다. 옵션 중 하나를 제거하세요. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + global.json에 워크로드 버전이 지정된 경우 {0} 옵션을 사용할 수 없습니다. {0} 옵션을 제거하거나, {1}에서 'workloadVersion' 요소를 제거하세요. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - 업데이트된 워크로드 매니페스트를 확인하는 중입니다. + 업데이트된 워크로드 버전을 확인하는 중입니다. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + {0} 워크로드 버전을 설치하지 못했습니다. {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf index 732f158db201..0b7065178f14 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pl.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Nie można używać opcji {0} i {1} razem. Usuń jedną z opcji. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Nie można użyć opcji {0}, jeśli wersja obciążenia jest określona w pliku global.json. Usuń opcję {0} lub usuń element „workloadVersion” z {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Sprawdzanie zaktualizowanych manifestów obciążenia. + Sprawdzanie dostępności zaktualizowanej wersji obciążenia. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Nie można zainstalować wersji obciążenia {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf index 87fd08333cb8..96316340faa8 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.pt-BR.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Não é possível usar as opções {0} e {1} juntas. Escolha uma das opções. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Não é possível usar a opção {0} quando a versão da carga de trabalho é especificada em global.json. Remova a opção {0} ou remova o elemento 'workloadVersion' de {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Verificando manifestos de carga de trabalho atualizados. + Verificando versões de carga de trabalho atualizadas. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Falha ao instalar a versão da carga de trabalho {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf index ae601d920cae..afb01e8c1b0d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.ru.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + Невозможно использовать параметры {0} и {1} одновременно. Удалите один из параметров. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Невозможно использовать параметр {0}, если версия рабочей нагрузки указана в файле global.json. Удалите параметр {0} или удалите элемент "workloadVersion" из {1}. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Проверка обновленных манифестов рабочей нагрузки. + Проверка обновленной версии рабочей нагрузки. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + Не удалось установить версию рабочей нагрузки {0}: {1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf index e9518e983218..38d16e9a52b4 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.tr.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + {0} ve {1} seçenekleri birlikte kullanılamaz. Seçeneklerden birini kaldırın. @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + Global.json'da iş yükü sürümü belirtildiğinde {0} seçeneği kullanılamaz. {0} seçeneğini kaldırın veya "workloadVersion" öğesini {1}‘den kaldırın. "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - Güncelleştirilmiş iş yükü bildirimleri denetleniyor. + Güncellenmiş iş yükü sürümü kontrol ediliyor. @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + İş yükü sürümü {0}: {1} yüklenemedi diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf index c5d962aa3cb7..d62d0490db8b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hans.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + 不能同时使用 {0} 和 {1} 选项。移除其中一个选项。 @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + 在 global.json 中指定工作负载版本时,无法使用 {0} 选项。移除 {0} 选项,或从 {1} 中移除“workloadVersion”元素。 "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - 正在检查更新的工作负载清单。 + 正在检查更新的工作负载版本。 @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + 未能安装工作负载版本 {0}:{1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf index 1310b788e92b..4e40f853af8d 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/install/xlf/LocalizableStrings.zh-Hant.xlf @@ -24,7 +24,7 @@ Cannot use the {0} and {1} options together. Remove one of the options. - Cannot use the {0} and {1} options together. Remove one of the options. + 無法同時使用 {0} 與 {1} 選項。移除其中一個選項。 @@ -34,12 +34,12 @@ Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. - Cannot use the {0} option when workload version is specified in global.json. Remove the {0} option, or remove the 'workloadVersion' element from {1}. + global.json 中指定工作負載版本時,無法使用 {0} 選項。移除 {0} 選項,或從 {1} 移除 'workloadVersion' 元素。 "workloadVersion" and "global.json" are literal values and should not be translated. Checking for updated workload version. - 正在檢查更新的工作負載資訊清單。 + 正在檢查更新的工作負載版本。 @@ -94,7 +94,7 @@ Failed to install workload version {0}: {1} - Failed to install workload version {0}: {1} + 無法安裝工作負載版本 {0}:{1} diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf index 07d3268cfcd7..8d3eb6ca5fa3 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.cs.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Možnosti {0} a {1} nelze použít společně. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf index 13363913f3c8..7c17e5d09527 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.de.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Die Optionen {0} und {1} können nicht zusammen verwendet werden. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf index 010c12251cb0..75da47ffa35c 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.es.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + No se pueden usar las opciones {0} y {1} juntas. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf index 493e4dde4dd7..be5f22f30485 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.fr.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Désolé, impossible d’utiliser les options {0} et {1} ensemble. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf index 8c18ef457e4d..fcf4d28bc2ce 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.it.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Impossibile utilizzare contemporaneamente le opzioni {0} e {1}. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf index 4a9ac5609d47..52590a32b678 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ja.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + {0} オプションと {1} オプションを同時に使用することはできません。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf index 5b3c2bdb6395..0ee856333151 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ko.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + {0} 및 {1} 옵션을 함께 사용할 수 없습니다. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf index 86ac37f91178..ae840b4e46cc 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pl.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Nie można używać opcji {0} i {1} razem. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf index 9c85446f7524..28ebb59c8b9b 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.pt-BR.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Não é possível usar as opções {0} e {1} juntas. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf index a8d05bda7b71..e60d0ddb77ee 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.ru.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + Невозможно использовать параметры {0} и {1} одновременно. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf index 66cd791043a1..e067c7dacac5 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.tr.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + {0} ve {1} seçenekleri birlikte kullanılamaz. diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf index 5f0e5561ea36..51bf32b6370a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hans.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + 不能同时使用 {0} 和 {1} 选项。 diff --git a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf index 69898de0d402..65215ba12b9a 100644 --- a/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf +++ b/src/Cli/dotnet/commands/dotnet-workload/update/xlf/LocalizableStrings.zh-Hant.xlf @@ -9,7 +9,7 @@ Cannot use the {0} and {1} options together. - Cannot use the {0} and {1} options together. + 無法同時使用 {0} 與 {1} 選項。 diff --git a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs index 172f968baa30..8e4bc29b7656 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/AuthHandshakeMessageHandler.cs @@ -2,6 +2,7 @@ // The .NET Foundation licenses this file to you under the MIT license. using System.Collections.Concurrent; +using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Net; @@ -38,12 +39,14 @@ private sealed record AuthInfo(string Realm, string? Service, string? Scope); private readonly string _registryName; private readonly ILogger _logger; + private readonly RegistryMode _registryMode; private static ConcurrentDictionary _authenticationHeaders = new(); - public AuthHandshakeMessageHandler(string registryName, HttpMessageHandler innerHandler, ILogger logger) : base(innerHandler) + public AuthHandshakeMessageHandler(string registryName, HttpMessageHandler innerHandler, ILogger logger, RegistryMode mode) : base(innerHandler) { _registryName = registryName; _logger = logger; + _registryMode = mode; } /// @@ -156,14 +159,10 @@ public DateTimeOffset ResolvedExpiration /// private async Task<(AuthenticationHeaderValue, DateTimeOffset)?> GetAuthenticationAsync(string registry, string scheme, AuthInfo? bearerAuthInfo, CancellationToken cancellationToken) { - // Allow overrides for auth via environment variables - string? credU = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectUser) ?? Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectUserLegacy); - string? credP = Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectPass) ?? Environment.GetEnvironmentVariable(ContainerHelpers.HostObjectPassLegacy); - - // fetch creds for the host + DockerCredentials? privateRepoCreds; - - if (!string.IsNullOrEmpty(credU) && !string.IsNullOrEmpty(credP)) + // Allow overrides for auth via environment variables + if (GetDockerCredentialsFromEnvironment(_registryMode) is (string credU, string credP)) { privateRepoCreds = new DockerCredentials(credU, credP); } @@ -196,6 +195,63 @@ public DateTimeOffset ResolvedExpiration } } + internal static (string credU, string credP)? TryGetCredentialsFromEnvVars(string unameVar, string passwordVar) + { + var credU = Environment.GetEnvironmentVariable(unameVar); + var credP = Environment.GetEnvironmentVariable(passwordVar); + if (!string.IsNullOrEmpty(credU) && !string.IsNullOrEmpty(credP)) + { + return (credU, credP); + } + else + { + return null; + } + } + + /// + /// Gets docker credentials from the environment variables based on registry mode. + /// + internal static (string credU, string credP)? GetDockerCredentialsFromEnvironment(RegistryMode mode) + { + if (mode == RegistryMode.Push) + { + if (TryGetCredentialsFromEnvVars(ContainerHelpers.PushHostObjectUser, ContainerHelpers.PushHostObjectPass) is (string, string) pushCreds) + { + return pushCreds; + } + + if (TryGetCredentialsFromEnvVars(ContainerHelpers.HostObjectUser, ContainerHelpers.HostObjectPass) is (string, string) genericCreds) + { + return genericCreds; + } + + return TryGetCredentialsFromEnvVars(ContainerHelpers.HostObjectUserLegacy, ContainerHelpers.HostObjectPassLegacy); + } + else if (mode == RegistryMode.Pull) + { + return TryGetCredentialsFromEnvVars(ContainerHelpers.PullHostObjectUser, ContainerHelpers.PullHostObjectPass); + } + else if (mode == RegistryMode.PullFromOutput) + { + if (TryGetCredentialsFromEnvVars(ContainerHelpers.PullHostObjectUser, ContainerHelpers.PullHostObjectPass) is (string, string) pullCreds) + { + return pullCreds; + } + + if (TryGetCredentialsFromEnvVars(ContainerHelpers.HostObjectUser, ContainerHelpers.HostObjectPass) is (string, string) genericCreds) + { + return genericCreds; + } + + return TryGetCredentialsFromEnvVars(ContainerHelpers.HostObjectUserLegacy, ContainerHelpers.HostObjectPassLegacy); + } + else + { + throw new InvalidEnumArgumentException(nameof(mode), (int)mode, typeof(RegistryMode)); + } + } + /// /// Implements the Docker OAuth2 Authentication flow as documented at . /// ContainerizeAsync( logger.LogTrace("Trace logging: enabled."); bool isLocalPull = string.IsNullOrEmpty(baseRegistry); - Registry? sourceRegistry = isLocalPull ? null : new Registry(baseRegistry, logger); + RegistryMode sourceRegistryMode = baseRegistry.Equals(outputRegistry, StringComparison.InvariantCultureIgnoreCase) ? RegistryMode.PullFromOutput : RegistryMode.Pull; + Registry? sourceRegistry = isLocalPull ? null : new Registry(baseRegistry, logger, sourceRegistryMode); SourceImageReference sourceImageReference = new(sourceRegistry, baseImageName, baseImageTag); DestinationImageReference destinationImageReference = DestinationImageReference.CreateFromSettings( diff --git a/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs b/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs index 9d8788825096..2782b321ebf0 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/ContainerHelpers.cs @@ -22,6 +22,12 @@ public static class ContainerHelpers internal const string HostObjectPass = "DOTNET_CONTAINER_REGISTRY_PWORD"; internal const string HostObjectPassLegacy = "SDK_CONTAINER_REGISTRY_PWORD"; + internal const string PushHostObjectUser = "DOTNET_CONTAINER_PUSH_REGISTRY_UNAME"; + internal const string PushHostObjectPass = "DOTNET_CONTAINER_PUSH_REGISTRY_PWORD"; + + internal const string PullHostObjectUser = "DOTNET_CONTAINER_PULL_REGISTRY_UNAME"; + internal const string PullHostObjectPass = "DOTNET_CONTAINER_PULL_REGISTRY_PWORD"; + internal const string DockerRegistryAlias = "docker.io"; /// diff --git a/src/Containers/Microsoft.NET.Build.Containers/DestinationImageReference.cs b/src/Containers/Microsoft.NET.Build.Containers/DestinationImageReference.cs index dc9c99a9fb97..a6c92d93dd80 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/DestinationImageReference.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/DestinationImageReference.cs @@ -75,7 +75,10 @@ public static DestinationImageReference CreateFromSettings( } else if (!string.IsNullOrEmpty(outputRegistry)) { - destinationImageReference = new DestinationImageReference(new Registry(outputRegistry, loggerFactory.CreateLogger()), repository, imageTags); + destinationImageReference = new DestinationImageReference( + new Registry(outputRegistry, loggerFactory.CreateLogger(), RegistryMode.Push), + repository, + imageTags); } else { diff --git a/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj b/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj index 99f1c7cc5899..0e65dc462fd1 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj +++ b/src/Containers/Microsoft.NET.Build.Containers/Microsoft.NET.Build.Containers.csproj @@ -8,8 +8,8 @@ $(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage - - true + + true . diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs index 71b937233fe4..dff5a8921cc2 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/DefaultRegistryAPI.cs @@ -22,11 +22,11 @@ internal class DefaultRegistryAPI : IRegistryAPI // Making this a round 30 for convenience. private static TimeSpan LongRequestTimeout = TimeSpan.FromMinutes(30); - internal DefaultRegistryAPI(string registryName, Uri baseUri, bool isInsecureRegistry, ILogger logger) + internal DefaultRegistryAPI(string registryName, Uri baseUri, bool isInsecureRegistry, ILogger logger, RegistryMode mode) { _baseUri = baseUri; _logger = logger; - _client = CreateClient(registryName, baseUri, isInsecureRegistry, logger); + _client = CreateClient(registryName, baseUri, logger, isInsecureRegistry, mode); Manifest = new DefaultManifestOperations(_baseUri, registryName, _client, _logger); Blob = new DefaultBlobOperations(_baseUri, registryName, _client, _logger); } @@ -35,11 +35,11 @@ internal DefaultRegistryAPI(string registryName, Uri baseUri, bool isInsecureReg public IManifestOperations Manifest { get; } - private static HttpClient CreateClient(string registryName, Uri baseUri, bool isInsecureRegistry, ILogger logger) + private static HttpClient CreateClient(string registryName, Uri baseUri, ILogger logger, bool isInsecureRegistry, RegistryMode mode) { HttpMessageHandler innerHandler = CreateHttpHandler(baseUri, isInsecureRegistry, logger); - HttpMessageHandler clientHandler = new AuthHandshakeMessageHandler(registryName, innerHandler, logger); + HttpMessageHandler clientHandler = new AuthHandshakeMessageHandler(registryName, innerHandler, logger, mode); if (baseUri.IsAmazonECRRegistry()) { diff --git a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs index a24d6249542d..c0328ee9b0fa 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Registry/Registry.cs @@ -53,6 +53,13 @@ public RidGraphManifestPicker(string runtimeIdentifierGraphPath) } +internal enum RegistryMode +{ + Push, + Pull, + PullFromOutput +} + internal sealed class Registry { private const string DockerHubRegistry1 = "registry-1.docker.io"; @@ -70,11 +77,24 @@ internal sealed class Registry /// public string RegistryName { get; } - internal Registry(string registryName, ILogger logger, IRegistryAPI? registryAPI = null, RegistrySettings? settings = null) : + internal Registry(string registryName, ILogger logger, IRegistryAPI registryAPI, RegistrySettings? settings = null) : this(new Uri($"https://{registryName}"), logger, registryAPI, settings) { } - internal Registry(Uri baseUri, ILogger logger, IRegistryAPI? registryAPI = null, RegistrySettings? settings = null) + internal Registry(string registryName, ILogger logger, RegistryMode mode, RegistrySettings? settings = null) : + this(new Uri($"https://{registryName}"), logger, new RegistryApiFactory(mode), settings) + { } + + + internal Registry(Uri baseUri, ILogger logger, IRegistryAPI registryAPI, RegistrySettings? settings = null) : + this(baseUri, logger, new RegistryApiFactory(registryAPI), settings) + { } + + internal Registry(Uri baseUri, ILogger logger, RegistryMode mode, RegistrySettings? settings = null) : + this(baseUri, logger, new RegistryApiFactory(mode), settings) + { } + + private Registry(Uri baseUri, ILogger logger, RegistryApiFactory factory, RegistrySettings? settings = null) { RegistryName = DeriveRegistryName(baseUri); @@ -87,7 +107,7 @@ internal Registry(Uri baseUri, ILogger logger, IRegistryAPI? registryAPI = null, _logger = logger; _settings = settings ?? new RegistrySettings(RegistryName); - _registryAPI = registryAPI ?? new DefaultRegistryAPI(RegistryName, BaseUri, _settings.IsInsecure, logger); + _registryAPI = factory.Create(RegistryName, BaseUri, logger, _settings.IsInsecure); } private static string DeriveRegistryName(Uri baseUri) @@ -95,7 +115,7 @@ private static string DeriveRegistryName(Uri baseUri) var port = baseUri.Port == -1 ? string.Empty : $":{baseUri.Port}"; if (baseUri.OriginalString.EndsWith(port, ignoreCase: true, culture: null)) { - // the port was part of the original assignment, so it's ok to consider it part of the 'name + // the port was part of the original assignment, so it's ok to consider it part of the 'name' return baseUri.GetComponents(UriComponents.HostAndPort, UriFormat.Unescaped); } else @@ -509,4 +529,25 @@ private async Task PushAsync(BuiltImage builtImage, SourceImageReference source, _logger.LogInformation(Strings.Registry_ManifestUploaded, RegistryName); } } + + private readonly ref struct RegistryApiFactory + { + private readonly IRegistryAPI? _registryApi; + private readonly RegistryMode? _mode; + + public RegistryApiFactory(IRegistryAPI registryApi) + { + _registryApi = registryApi; + } + + public RegistryApiFactory(RegistryMode mode) + { + _mode = mode; + } + + public IRegistryAPI Create(string registryName, Uri baseUri, ILogger logger, bool isInsecureRegistry) + { + return _registryApi ?? new DefaultRegistryAPI(registryName, baseUri, isInsecureRegistry, logger, _mode!.Value); + } + } } diff --git a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs index 0cafc1407c21..e6537b3160af 100644 --- a/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs +++ b/src/Containers/Microsoft.NET.Build.Containers/Tasks/CreateNewImage.cs @@ -60,7 +60,8 @@ internal async Task ExecuteAsync(CancellationToken cancellationToken) return !Log.HasLoggedErrors; } - Registry? sourceRegistry = IsLocalPull ? null : new Registry(BaseRegistry, logger); + RegistryMode sourceRegistryMode = BaseRegistry.Equals(OutputRegistry, StringComparison.InvariantCultureIgnoreCase) ? RegistryMode.PullFromOutput : RegistryMode.Pull; + Registry? sourceRegistry = IsLocalPull ? null : new Registry(BaseRegistry, logger, sourceRegistryMode); SourceImageReference sourceImageReference = new(sourceRegistry, BaseImageName, BaseImageTag); DestinationImageReference destinationImageReference = DestinationImageReference.CreateFromSettings( diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf index 4407d1e29043..1891cc4ff30b 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.cs.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Neexistuje žádný manifest s ID {0}. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf index 4ef614824da0..aa35c3838c22 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.de.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Es ist kein Manifest mit der ID {0} vorhanden. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf index 965f78c7a674..485e6e0a0cf8 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.es.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + No existe ningún manifiesto con id. {0}. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf index 86ea8311cbd8..0ae7f6800bd3 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.fr.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Aucun manifeste ayant l’ID {0} existe. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf index 7bab4f663335..7c666799e412 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.it.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Non esiste alcun manifesto con ID {0}. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf index 7a8e0cf5bd18..cc172807eaa9 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ja.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + ID を持つ {0} マニフェストが存在しません。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf index ece3a585d49f..385531b1c48b 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ko.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + ID가 {0}인 매니페스트가 없습니다. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf index 4d426d6393bb..2f5dc549ddf0 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pl.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Nie istnieje żaden manifest o identyfikatorze {0}. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf index 006a94cd72fa..f5f0331a25ec 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.pt-BR.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Não existe nenhum manifesto com ID {0}. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf index c99667294093..bf88a6af7bbe 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.ru.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + Манифест с идентификатором {0} не существует. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf index c8522d74ad06..786f001a3435 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.tr.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + {0} kimliğine sahip bildirim yok. diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf index 0aefce1fe3ef..911a2731d284 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hans.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + 不存在 ID 为 {0} 的清单。 diff --git a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf index e34619e9f3f4..423e6216ecca 100644 --- a/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf +++ b/src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/xlf/Strings.zh-Hant.xlf @@ -79,7 +79,7 @@ No manifest with ID {0} exists. - No manifest with ID {0} exists. + 沒有識別碼為 {0} 的資訊清單。 diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs index 46c560e598a9..66733c52896c 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/CreateNewImageTests.cs @@ -226,7 +226,7 @@ public async System.Threading.Tasks.Task CreateNewImage_RootlessBaseImage() var logger = loggerFactory.CreateLogger(nameof(CreateNewImage_RootlessBaseImage)); // Build a rootless base runtime image. - Registry registry = new(DockerRegistryManager.LocalRegistry, logger); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); ImageBuilder imageBuilder = await registry.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs index f7092132c208..cc7aa1abc878 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryManager.cs @@ -46,8 +46,8 @@ public static async Task StartAndPopulateDockerRegistry(ITestOutputHelper testOu int spawnRegistryDelay = 1000; //ms StringBuilder failureReasons = new(); - var pullRegistry = new Registry(BaseImageSource, logger); - var pushRegistry = new Registry(LocalRegistry, logger); + var pullRegistry = new Registry(BaseImageSource, logger, RegistryMode.Pull); + var pushRegistry = new Registry(LocalRegistry, logger, RegistryMode.Push); for (int spawnRegistryAttempt = 1; spawnRegistryAttempt <= spawnRegistryMaxRetry; spawnRegistryAttempt++) { diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs index 4a6b346ce68c..a992e06b4e8c 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/DockerRegistryTests.cs @@ -22,7 +22,7 @@ public async Task GetFromRegistry() { var loggerFactory = new TestLoggerFactory(_testOutput); var logger = loggerFactory.CreateLogger(nameof(GetFromRegistry)); - Registry registry = new(DockerRegistryManager.LocalRegistry, logger); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); var ridgraphfile = ToolsetUtils.GetRuntimeGraphFilePath(); // Don't need rid graph for local registry image pulls - since we're only pushing single image manifests (not manifest lists) @@ -37,7 +37,7 @@ public async Task GetFromRegistry() Assert.NotNull(downloadedImage); } - [DockerAvailableFact] + [DockerAvailableFact(Skip = "https://github.com/dotnet/sdk/issues/42820")] public async Task WriteToPrivateBasicRegistry() { ILogger logger = _loggerFactory.CreateLogger(nameof(WriteToPrivateBasicRegistry)); @@ -54,6 +54,7 @@ public async Task WriteToPrivateBasicRegistry() var registryCertFile = Path.Combine(registryCertsDir.FullName, "domain.crt"); // export dev cert, using --no-password also generates a matching key file + new DotnetCommand(_testOutput, $"dev-certs", "https", "--trust").Execute().Should().Pass(); new DotnetCommand(_testOutput, $"dev-certs", "https", "--export-path", registryCertFile, "--format", "PEM", "--no-password").Execute().Should().Pass(); // start up an authenticated registry using that dev cert ContainerCli.RunCommand(_testOutput, @@ -74,9 +75,9 @@ public async Task WriteToPrivateBasicRegistry() // login to that registry ContainerCli.LoginCommand(_testOutput, "--username", "testuser", "--password", "testpassword", registryName).Execute().Should().Pass(); // push an image to that registry using username/password - Registry localAuthed = new(new Uri($"https://{registryName}"), logger, settings: new(registryName) { ParallelUploadEnabled = false, ForceChunkedUpload = true }); + Registry localAuthed = new(new Uri($"https://{registryName}"), logger, RegistryMode.Push, settings: new() { ParallelUploadEnabled = false, ForceChunkedUpload = true }); var ridgraphfile = ToolsetUtils.GetRuntimeGraphFilePath(); - Registry mcr = new(DockerRegistryManager.BaseImageSource, logger); + Registry mcr = new(DockerRegistryManager.BaseImageSource, logger, RegistryMode.Pull); var sourceImage = new SourceImageReference(mcr, DockerRegistryManager.RuntimeBaseImage, DockerRegistryManager.Net6ImageTag); var destinationImage = new DestinationImageReference(localAuthed, DockerRegistryManager.RuntimeBaseImage, new[] { DockerRegistryManager.Net6ImageTag }); diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs index 1cdd6761b515..4896907c8c8e 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/EndToEndTests.cs @@ -46,7 +46,7 @@ public async Task ApiEndToEndWithRegistryPushAndPull() // Build the image - Registry registry = new(DockerRegistryManager.LocalRegistry, logger); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); ImageBuilder imageBuilder = await registry.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, @@ -93,7 +93,7 @@ public async Task ApiEndToEndWithLocalLoad() // Build the image - Registry registry = new(DockerRegistryManager.LocalRegistry, logger); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); ImageBuilder imageBuilder = await registry.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, @@ -134,7 +134,7 @@ public async Task ApiEndToEndWithArchiveWritingAndLoad() // Build the image - Registry registry = new(DockerRegistryManager.LocalRegistry, logger); + Registry registry = new(DockerRegistryManager.LocalRegistry, logger, RegistryMode.Push); ImageBuilder imageBuilder = await registry.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, @@ -562,7 +562,7 @@ public async Task CanPackageForAllSupportedContainerRIDs(string dockerPlatform, string publishDirectory = BuildLocalApp(tfm: ToolsetInfo.CurrentTargetFramework, rid: rid); // Build the image - Registry registry = new(DockerRegistryManager.BaseImageSource, logger); + Registry registry = new(DockerRegistryManager.BaseImageSource, logger, RegistryMode.Push); var isWin = rid.StartsWith("win"); ImageBuilder? imageBuilder = await registry.GetImageManifestAsync( DockerRegistryManager.RuntimeBaseImage, diff --git a/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs b/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs index afd41fbc508f..263d4b5083c8 100644 --- a/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs +++ b/test/Microsoft.NET.Build.Containers.IntegrationTests/RegistryTests.cs @@ -39,7 +39,7 @@ public async Task CanReadManifestFromRegistry(string fullyQualifiedContainerName containerTag ??= "latest"; ILogger logger = _loggerFactory.CreateLogger(nameof(CanReadManifestFromRegistry)); - Registry registry = new(containerRegistry, logger); + Registry registry = new(containerRegistry, logger, RegistryMode.Pull); var ridgraphfile = ToolsetUtils.GetRuntimeGraphFilePath(); diff --git a/test/Microsoft.NET.Build.Containers.UnitTests/AuthHandshakeMessageHandlerTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/AuthHandshakeMessageHandlerTests.cs new file mode 100644 index 000000000000..9e17b99e56bc --- /dev/null +++ b/test/Microsoft.NET.Build.Containers.UnitTests/AuthHandshakeMessageHandlerTests.cs @@ -0,0 +1,38 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. + +namespace Microsoft.NET.Build.Containers.UnitTests +{ + public class AuthHandshakeMessageHandlerTests + { + [Theory] + [InlineData("SDK_CONTAINER_REGISTRY_UNAME", "SDK_CONTAINER_REGISTRY_PWORD", (int)RegistryMode.Push)] + [InlineData("DOTNET_CONTAINER_PUSH_REGISTRY_UNAME", "DOTNET_CONTAINER_PUSH_REGISTRY_PWORD", (int)RegistryMode.Push)] + [InlineData("DOTNET_CONTAINER_PULL_REGISTRY_UNAME", "DOTNET_CONTAINER_PULL_REGISTRY_PWORD", (int)RegistryMode.Pull)] + [InlineData("DOTNET_CONTAINER_PULL_REGISTRY_UNAME", "DOTNET_CONTAINER_PULL_REGISTRY_PWORD", (int)RegistryMode.PullFromOutput)] + [InlineData("SDK_CONTAINER_REGISTRY_UNAME", "SDK_CONTAINER_REGISTRY_PWORD", (int)RegistryMode.PullFromOutput)] + public void GetDockerCredentialsFromEnvironment_ReturnsCorrectValues(string unameVarName, string pwordVarName, int mode) + { + string? originalUnameValue = Environment.GetEnvironmentVariable(unameVarName); + string? originalPwordValue = Environment.GetEnvironmentVariable(pwordVarName); + + Environment.SetEnvironmentVariable(unameVarName, "uname"); + Environment.SetEnvironmentVariable(pwordVarName, "pword"); + + if (AuthHandshakeMessageHandler.GetDockerCredentialsFromEnvironment((RegistryMode)mode) is (string credU, string credP)) + { + Assert.Equal("uname", credU); + Assert.Equal("pword", credP); + } + else + { + Assert.Fail("Should have parsed credentials from environment"); + } + + + // restore env variable values + Environment.SetEnvironmentVariable(unameVarName, originalUnameValue); + Environment.SetEnvironmentVariable(pwordVarName, originalPwordValue); + } + } +} diff --git a/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs b/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs index 981747d5cc88..81740674b438 100644 --- a/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs +++ b/test/Microsoft.NET.Build.Containers.UnitTests/RegistryTests.cs @@ -35,7 +35,7 @@ public void Dispose() public void CheckIfGoogleArtifactRegistry(string registryName, bool isECR) { ILogger logger = _loggerFactory.CreateLogger(nameof(CheckIfGoogleArtifactRegistry)); - Registry registry = new(registryName, logger); + Registry registry = new(registryName, logger, RegistryMode.Push); Assert.Equal(isECR, registry.IsGoogleArtifactRegistry); } @@ -43,7 +43,7 @@ public void CheckIfGoogleArtifactRegistry(string registryName, bool isECR) public void DockerIoAlias() { ILogger logger = _loggerFactory.CreateLogger(nameof(DockerIoAlias)); - Registry registry = new("docker.io", logger); + Registry registry = new("docker.io", logger, RegistryMode.Push); Assert.True(registry.IsDockerHub); Assert.Equal("docker.io", registry.RegistryName); Assert.Equal("registry-1.docker.io", registry.BaseUri.Host); @@ -462,7 +462,7 @@ public async Task InsecureRegistry(bool isInsecureRegistry, bool serverIsHttps, { IsInsecure = isInsecureRegistry }; - Registry registry = new(registryUri, logger, settings: settings); + Registry registry = new(registryUri, logger, RegistryMode.Pull, settings: settings); // Make a request. Task getManifest = registry.GetImageManifestAsync(repositoryName: "dotnet/runtime", reference: "latest", runtimeIdentifier: "linux-x64", manifestPicker: null!, cancellationToken: default!);