From e741bfa5226260fbd4584b269651918fbf84bc40 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Tue, 15 Sep 2020 19:45:44 -0700 Subject: [PATCH 1/8] Update error text for SupportedOSPlatformVersion --- src/Tasks/Common/Resources/Strings.resx | 4 ++-- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 10 +++++----- src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 10 +++++----- .../Microsoft.NET.TargetFrameworkInference.targets | 2 +- 15 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index c021233c4f92..7cbf13eb847d 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -641,8 +641,8 @@ The following are names of parameters or literal values and should not be transl NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index d82ba76bdb11..49e8e6237bf7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -107,11 +107,6 @@ NETSDK1007: Nelze najít informace o projektu pro {0}. Může to znamenat chybějící odkaz na projekt. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: Platforma RuntimeIdentifier {0} a PlatformTarget {1} musí být kompatibilní. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 4aab24897785..8d39915c2e05 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -107,11 +107,6 @@ NETSDK1007: Die Projektinformationen für "{0}" wurden nicht gefunden. Dies ist möglicherweise auf einen fehlenden Projektverweis zurückzuführen. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: Die RuntimeIdentifier-Plattform "{0}" und das PlatformTarget "{1}" müssen kompatibel sein. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 291fcfb1d97e..3bc5e9b167e6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -107,11 +107,6 @@ NETSDK1007: No se encuentra la información de proyecto de "{0}". Esto puede indicar que falta una referencia de proyecto. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: Las plataformas RuntimeIdentifier "{0}" y PlatformTarget "{1}" deben ser compatibles. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 0b745493e9d2..b93fbfb9ae4c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -107,11 +107,6 @@ NETSDK1007: Les informations relatives au projet sont introuvables pour '{0}'. Cela peut indiquer une référence de projet manquante. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: La plateforme de RuntimeIdentifier '{0}' et le PlatformTarget '{1}' doivent être compatibles. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index dc5a07a19d6a..9e7c1ba65d17 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -107,11 +107,6 @@ NETSDK1007: le informazioni del progetto per '{0}' non sono state trovate. Questo errore può indicare la mancanza di un riferimento al progetto. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: la piattaforma '{0}' di RuntimeIdentifier e quella '{1}' di PlatformTarget devono essere compatibili. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index d36b12bd2df6..7491105f5835 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -107,11 +107,6 @@ NETSDK1007: '{0}' のプロジェクト情報が見つかりません。これは、プロジェクト参照がないことを示している可能性があります。 {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: RuntimeIdentifier プラットフォーム '{0}' と PlatformTarget '{1}' には互換性が必要です。 @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 21c156b44e5b..699a389630ba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -107,11 +107,6 @@ NETSDK1007: '{0}'에 대한 프로젝트 정보를 찾을 수 없습니다. 프로젝트 참조가 없음을 나타낼 수 있습니다. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: RuntimeIdentifier 플랫폼 '{0}'과(와) PlatformTarget '{1}'은(는) 호환되어야 합니다. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 8677eb6b4db2..4dfaf93280d7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -107,11 +107,6 @@ NETSDK1007: Nie odnaleziono informacji o projekcie dla elementu „{0}”. Może to wskazywać na brakujące odwołanie do projektu. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: Platforma elementu RuntimeIdentifier „{0}” i element PlatformTarget „{1}” muszą być zgodne. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index caae65bebb87..85c3b148dde3 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -107,11 +107,6 @@ NETSDK1007: Não é possível localizar informações do projeto para '{0}'. Isso pode indicar a ausência de uma referência de projeto. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: A plataforma '{0}' do RuntimeIdentifier e o PlatformTarget '{1}' precisam ser compatíveis. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index e9730f7cc954..670ba0cc4ab9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -107,11 +107,6 @@ NETSDK1007: не удается найти сведения о проекте "{0}". Возможно, отсутствует ссылка на проект. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: платформа RuntimeIdentifier "{0}" и PlatformTarget "{1}" должны быть совместимы. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 0af271bf27b5..502698a9e575 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -107,11 +107,6 @@ NETSDK1007: '{0}' için proje bilgisi bulunamıyor. Bu durum, bir proje başvurusunun eksik olduğunu gösteriyor olabilir. {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: RuntimeIdentifier platformu '{0}' ile PlatformTarget '{1}' uyumlu olmalıdır. @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index eab22231eb6b..c34b4b73f6c7 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -107,11 +107,6 @@ NETSDK1007: 找不到“{0}”的项目信息。这可以指示缺少一个项目引用。 {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: RuntimeIdentifier 平台“{0}”和 PlatformTarget“{1}”必须兼容。 @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index a3e666a30828..c3c7a202737c 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -107,11 +107,6 @@ NETSDK1007: 找不到 '{0}' 的專案資訊。這可能表示遺漏專案參考。 {StrBegin="NETSDK1007: "} - - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - {StrBegin="NETSDK1135: "} - NETSDK1032: The RuntimeIdentifier platform '{0}' and the PlatformTarget '{1}' must be compatible. NETSDK1032: RuntimeIdentifier 平台 '{0}' 必須與 PlatformTarget '{1}' 相容。 @@ -142,6 +137,11 @@ NETSDK1134: Building a solution with a specific RuntimeIdentifier is not supported. If you would like to publish for a single RID, specifiy the RID at the individual project level instead. {StrBegin="NETSDK1134: "} + + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatformVersion {0} cannot be higher than TargetPlatformVersion {1}. + {StrBegin="NETSDK1135: "} + NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. NETSDK1143: Including all content in a single file bundle also includes native libraries. If IncludeAllContentForSelfExtract is true, IncludeNativeLibrariesForSelfExtract must not be false. diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index 62eabbca301f..8cb41dbe9289 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -187,7 +187,7 @@ Copyright (c) .NET Foundation. All rights reserved. From 91be61f72d82d2beb1732cf6fe4ad36d4edf4dd7 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 16 Sep 2020 18:08:50 -0700 Subject: [PATCH 2/8] Generate target platform attributes - Use SupportedOSPlatformVersion property instead of SupportedOSPlatform - Generate TargetPlatformAttribute - Sync SupportedOSPlatformVersion property with TargetPlatformMinVersion property on Windows --- ...Microsoft.NET.GenerateAssemblyInfo.targets | 17 ++++++++++---- ...osoft.NET.TargetFrameworkInference.targets | 23 ++++++++++++++----- .../targets/Microsoft.NET.Windows.targets | 2 +- 3 files changed, 31 insertions(+), 11 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets index 73abd0c2143d..d65b397c8f4c 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.GenerateAssemblyInfo.targets @@ -117,15 +117,24 @@ Copyright (c) .NET Foundation. All rights reserved. + + <_Parameter1>$(TargetPlatformIdentifier)$(TargetPlatformVersion) + + + + - <_Parameter1>$(TargetPlatformIdentifier)$(SupportedOSPlatform) + Condition="!$([MSBuild]::VersionEquals($(SupportedOSPlatformVersion), '0.0'))" > + <_Parameter1>$(TargetPlatformIdentifier)$(SupportedOSPlatformVersion) + Condition="$([MSBuild]::VersionEquals($(SupportedOSPlatformVersion), '0.0'))" > <_Parameter1>$(TargetPlatformIdentifier) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index 8cb41dbe9289..dea47b628201 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -77,9 +77,20 @@ Copyright (c) .NET Foundation. All rights reserved. <_UnsupportedTargetFrameworkError>true - - - $(TargetPlatformVersion) + + + $(TargetPlatformMinVersion) + $(SupportedOSPlatformVersion) + + + $(TargetPlatformVersion) + $(TargetPlatformVersion) + + + + + $(TargetPlatformVersion) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets index e48ac51ed11a..5304254f91a6 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Windows.targets @@ -27,7 +27,7 @@ Copyright (c) .NET Foundation. All rights reserved. 7.0 - $(TargetPlatformVersion) + $(TargetPlatformVersion) Windows,Version=$(TargetPlatformVersion) Windows $(TargetPlatformVersion) From f57d0892ffdf60775d2a3887067dcfb93135fba7 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Wed, 16 Sep 2020 18:09:19 -0700 Subject: [PATCH 3/8] Update tests to cover TargetPlatformAttribute --- ...ntToBuildALibraryWithOSSupportedVersion.cs | 74 ++++++++++++++----- 1 file changed, 57 insertions(+), 17 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs index 2676d5e6a518..a3b973a5c537 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs @@ -28,7 +28,9 @@ public void WhenPropertiesAreNotSetItShouldNotGenerateSupportedOSPlatformAttribu runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); runCommand.Execute() .Should() - .Pass().And.HaveStdOutContaining("NO ATTRIBUTE"); + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute(null)) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute(null)); } [Fact] @@ -40,7 +42,7 @@ public void WhenPropertiesAreSetItCanGenerateSupportedOSPlatformAttribute() testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; - testProject.AdditionalProperties["SupportedOSPlatform"] = "13.2"; + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "13.2"; testProject.AdditionalProperties["TargetPlatformVersion"] = "14.0"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -49,11 +51,13 @@ public void WhenPropertiesAreSetItCanGenerateSupportedOSPlatformAttribute() runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); runCommand.Execute() .Should() - .Pass().And.HaveStdOutContaining("PlatformName:'iOS13.2'"); + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("iOS14.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("iOS13.2")); } [Fact] - public void WhenSupportedOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerateSupportedOSPlatformAttribute() + public void WhenSupportedOSPlatformVersionIsNotSetTargetPlatformVersionIsSetItCanGenerateSupportedOSPlatformAttribute() { TestProject testProject = SetUpProject(); @@ -69,7 +73,9 @@ public void WhenSupportedOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenera runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); runCommand.Execute() .Should() - .Pass().And.HaveStdOutContaining("PlatformName:'iOS13.2'"); + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("iOS13.2")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("iOS13.2")); } [Fact] @@ -84,7 +90,9 @@ public void WhenUsingDefaultTargetPlatformVersionItCanGenerateSupportedOSPlatfor runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); runCommand.Execute() .Should() - .Pass().And.HaveStdOutContaining("PlatformName:'Windows7.0'"); + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("Windows7.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows7.0")); } [WindowsOnlyTheory] @@ -100,14 +108,16 @@ public void WhenUsingTargetPlatformInTargetFrameworkItCanGenerateSupportedOSPlat runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); runCommand.Execute() .Should() - .Pass().And.HaveStdOutContaining($"PlatformName:'{ expectedAttribute }'"); + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute(expectedAttribute)) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute(expectedAttribute)); } [Fact] - public void WhenUsingZeroedSupportedOSPlatformItCanGenerateSupportedOSPlatformAttribute() + public void WhenUsingZeroedSupportedOSPlatformVersionItCanGenerateSupportedOSPlatformAttribute() { TestProject testProject = SetUpProject("net5.0-windows"); - testProject.AdditionalProperties["SupportedOSPlatform"] = "0.0"; + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "0.0"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -116,12 +126,12 @@ public void WhenUsingZeroedSupportedOSPlatformItCanGenerateSupportedOSPlatformAt runCommand.Execute() .Should() .Pass() - .And - .HaveStdOutContaining("PlatformName:'Windows'"); + .And.HaveStdOutContaining(TargetPlatformAttribute("Windows7.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows")); } [Fact] - public void WhenSupportedOSPlatformIsHigherThanTargetPlatformVersionItShouldError() + public void WhenSupportedOSPlatformVersionIsHigherThanTargetPlatformVersionItShouldError() { TestProject testProject = SetUpProject(); @@ -129,7 +139,7 @@ public void WhenSupportedOSPlatformIsHigherThanTargetPlatformVersionItShouldErro testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; testProject.AdditionalProperties["TargetPlatformVersion"] = "13.2"; - testProject.AdditionalProperties["SupportedOSPlatform"] = "14.0"; + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "14.0"; testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; var testAsset = _testAssetsManager.CreateTestProject(testProject); @@ -140,6 +150,24 @@ public void WhenSupportedOSPlatformIsHigherThanTargetPlatformVersionItShouldErro .Fail().And.HaveStdOutContaining("NETSDK1135"); } + private static string TargetPlatformAttribute(string targetPlatform) + { + string expected = string.IsNullOrEmpty(targetPlatform) ? + "NO TargetPlatformAttribute" : + $"TargetPlatform:'{targetPlatform}'"; + + return expected; + } + + private static string SupportedOSPlatformAttribute(string supportedOSPlatform) + { + string expected = string.IsNullOrEmpty(supportedOSPlatform) ? + "NO SupportedOSPlatformAttribute" : + $"SupportedOSPlatform:'{supportedOSPlatform}'"; + + return expected; + } + private static TestProject SetUpProject(string targetFramework = "net5.0") { TestProject testProject = new TestProject() @@ -150,11 +178,11 @@ private static TestProject SetUpProject(string targetFramework = "net5.0") TargetFrameworks = targetFramework, }; - testProject.SourceFiles["PrintAttribute.cs"] = _printAttribute; + testProject.SourceFiles["PrintAttributes.cs"] = _printAttributes; return testProject; } - private static readonly string _printAttribute = @" + private static readonly string _printAttributes = @" using System; using System.Runtime.Versioning; @@ -165,15 +193,27 @@ internal static class CustomAttributesTestApp public static void Main() { var assembly = typeof(CustomAttributesTestApp).Assembly; + + object[] targetPlatformAttributes = assembly.GetCustomAttributes(typeof(System.Runtime.Versioning.TargetPlatformAttribute), false); + if (targetPlatformAttributes.Length > 0) + { + var attribute = targetPlatformAttributes[0] as System.Runtime.Versioning.TargetPlatformAttribute; + Console.WriteLine($""TargetPlatform:'{attribute.PlatformName}'""); + } + else + { + Console.WriteLine(""NO TargetPlatformAttribute""); + } + object[] attributes = assembly.GetCustomAttributes(typeof(System.Runtime.Versioning.SupportedOSPlatformAttribute), false); if (attributes.Length > 0) { var attribute = attributes[0] as System.Runtime.Versioning.SupportedOSPlatformAttribute; - Console.WriteLine($""PlatformName:'{attribute.PlatformName}'""); + Console.WriteLine($""SupportedOSPlatform:'{attribute.PlatformName}'""); } else { - Console.WriteLine(""NO ATTRIBUTE""); + Console.WriteLine(""NO SupportedOSPlatformAttribute""); } } } From df6b0872aa038fa227dd41216b676d0a44ee4ca8 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 17 Sep 2020 04:36:07 -0700 Subject: [PATCH 4/8] Add tests for TargetPlatformMinVersion property --- ...ntToBuildALibraryWithOSSupportedVersion.cs | 88 ++++++++++++++++++- 1 file changed, 87 insertions(+), 1 deletion(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs index a3b973a5c537..fcdb51998526 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs @@ -97,7 +97,7 @@ public void WhenUsingDefaultTargetPlatformVersionItCanGenerateSupportedOSPlatfor [WindowsOnlyTheory] [InlineData("net5.0-windows", "Windows7.0")] - [InlineData("net5.0-windows10.0.19041.0", "Windows10.0.19041.0")] + [InlineData("net5.0-windows10.0.19041", "Windows10.0.19041.0")] public void WhenUsingTargetPlatformInTargetFrameworkItCanGenerateSupportedOSPlatformAttribute(string targetFramework, string expectedAttribute) { TestProject testProject = SetUpProject(targetFramework); @@ -150,6 +150,92 @@ public void WhenSupportedOSPlatformVersionIsHigherThanTargetPlatformVersionItSho .Fail().And.HaveStdOutContaining("NETSDK1135"); } + [Fact] + public void WhenTargetPlatformMinVersionIsSetForWindowsItIsUsedForTheSupportedOSPlatformAttribute() + { + TestProject testProject = SetUpProject("net5.0-windows10.0.19041"); + testProject.AdditionalProperties["TargetPlatformMinVersion"] = "10.0.18362.0"; + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var runCommand = new DotnetCommand(Log, "run"); + runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); + runCommand.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("Windows10.0.19041.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows10.0.18362.0")); + } + + [Fact] + public void WhenTargetingWindowsSupportedOSVersionPropertySetsTargetPlatformMinVersion() + { + TestProject testProject = SetUpProject("net5.0-windows10.0.19041"); + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "10.0.18362.0"; + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var runCommand = new DotnetCommand(Log, "run"); + runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); + runCommand.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("Windows10.0.19041.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows10.0.18362.0")); + + var getValuesCommand = new GetValuesCommand(testAsset, "TargetPlatformMinVersion"); + getValuesCommand.Execute() + .Should() + .Pass(); + + getValuesCommand.GetValues() + .Should() + .BeEquivalentTo("10.0.18362.0"); + } + + [Fact] + public void WhenTargetingWindowsSupportedOSPlatformVersionPropertyIsPreferredOverTargetPlatformMinVersion() + { + TestProject testProject = SetUpProject("net5.0-windows10.0.19041"); + testProject.AdditionalProperties["TargetPlatformMinVersion"] = "10.0.18362.0"; + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "10.0.17663.0"; + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var runCommand = new DotnetCommand(Log, "run"); + runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); + runCommand.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("Windows10.0.19041.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows10.0.17663.0")); + + } + + [Fact] + public void WhenNotTargetingWindowsTargetPlatformMinVersionPropertyIsIgnored() + { + TestProject testProject = SetUpProject(); + + var targetPlatformIdentifier = "iOS"; + testProject.AdditionalProperties["TargetPlatformIdentifier"] = targetPlatformIdentifier; + testProject.AdditionalProperties["TargetPlatformSupported"] = "true"; + testProject.AdditionalProperties["TargetPlatformVersionSupported"] = "true"; + testProject.AdditionalProperties["SupportedOSPlatformVersion"] = "13.2"; + testProject.AdditionalProperties["TargetPlatformVersion"] = "14.0"; + testProject.AdditionalProperties["TargetPlatformMinVersion"] = "12.0"; + + var testAsset = _testAssetsManager.CreateTestProject(testProject); + + var runCommand = new DotnetCommand(Log, "run"); + runCommand.WorkingDirectory = Path.Combine(testAsset.TestRoot, testProject.Name); + runCommand.Execute() + .Should() + .Pass() + .And.HaveStdOutContaining(TargetPlatformAttribute("iOS14.0")) + .And.HaveStdOutContaining(SupportedOSPlatformAttribute("iOS13.2")); + } + private static string TargetPlatformAttribute(string targetPlatform) { string expected = string.IsNullOrEmpty(targetPlatform) ? From a47d789ca0f50a619288bee5e2d8836252e86006 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 17 Sep 2020 04:53:31 -0700 Subject: [PATCH 5/8] Reduce duplication in setting version-related properties --- .../targets/Microsoft.NET.Sdk.targets | 12 ++++++++++++ ...icrosoft.NET.TargetFrameworkInference.targets | 16 ---------------- .../targets/Microsoft.NET.Windows.targets | 13 ++++++++++--- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets index 5bde0baa57aa..5cf44a49a5a2 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.targets @@ -1009,4 +1009,16 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + $(TargetPlatformIdentifier),Version=$(TargetPlatformVersion) + $([Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKDisplayName($(TargetPlatformIdentifier), $(TargetPlatformVersion))) + + + + + $(TargetPlatformVersion) + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index dea47b628201..348933dc451e 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -77,22 +77,6 @@ Copyright (c) .NET Foundation. All rights reserved. <_UnsupportedTargetFrameworkError>true - - - $(TargetPlatformMinVersion) - $(SupportedOSPlatformVersion) - - - $(TargetPlatformVersion) - $(TargetPlatformVersion) - - - - - $(TargetPlatformVersion) - - 7.0 - + + + + + $(TargetPlatformMinVersion) + $(SupportedOSPlatformVersion) + + $(TargetPlatformVersion) - Windows,Version=$(TargetPlatformVersion) - Windows $(TargetPlatformVersion) + $(TargetPlatformVersion) From 37d5ade0f863258a78313b8421eae0eb02d25c69 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 17 Sep 2020 04:57:49 -0700 Subject: [PATCH 6/8] Rename SdkSupportedTargetPlatform to SdkSupportedTargetPlatformVersion --- .../Microsoft.NET.TargetFrameworkInference.targets | 6 +++--- ...soft.NET.WindowsSdkSupportedTargetPlatforms.props | 12 ++++++------ .../GivenThatWeWantToBuildALibrary.cs | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index 348933dc451e..8cbc18a86a94 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -191,7 +191,7 @@ Copyright (c) .NET Foundation. All rights reserved. BeforeTargets="ProcessFrameworkReferences" Condition="'$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and '$(Language)' != 'C++'"> - <_ValidTargetPlatformVersion Include="@(SdkSupportedTargetPlatform)" Condition="'@(SdkSupportedTargetPlatform)' != '' and $([MSBuild]::VersionEquals(%(Identity), $(TargetPlatformVersion)))" /> + <_ValidTargetPlatformVersion Include="@(SdkSupportedTargetPlatformVersion)" Condition="'@(SdkSupportedTargetPlatformVersion)' != '' and $([MSBuild]::VersionEquals(%(Identity), $(TargetPlatformVersion)))" /> @@ -205,8 +205,8 @@ Copyright (c) .NET Foundation. All rights reserved. Condition="'$(TargetPlatformVersion)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(TargetFrameworkVersion), 5.0)) and '$(Language)' != 'C++'"> true - <_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatform)' != ''" >@(SdkSupportedTargetPlatform, '%0a') - <_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatform)' == ''" >None + <_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatformVersion)' != ''" >@(SdkSupportedTargetPlatformVersion, '%0a') + <_ValidTargetPlatformVersions Condition="'@(SdkSupportedTargetPlatformVersion)' == ''" >None - - - - - + + + + + - + diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs index 8135760dbb54..5273404dcd12 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibrary.cs @@ -392,7 +392,7 @@ public void It_implicitly_defines_compilation_constants_for_the_target_framework [InlineData(new string[] { }, "windows", "10.0.19041.0", new[] { "WINDOWS" })] [InlineData(new[] { "1.0", "1.1" }, "ios", "1.1", new[] { "IOS" })] [InlineData(new[] { "11.11", "12.12", "13.13" }, "android", "12.12", new[] { "ANDROID" })] - public void It_implicitly_defines_compilation_constants_for_the_target_platform(string[] sdkSupportedTargetPlatform, string targetPlatformIdentifier, string targetPlatformVersion, string[] expectedDefines) + public void It_implicitly_defines_compilation_constants_for_the_target_platform(string[] sdkSupportedTargetPlatformVersion, string targetPlatformIdentifier, string targetPlatformVersion, string[] expectedDefines) { var targetFramework = "net5.0"; var testAsset = _testAssetsManager @@ -417,9 +417,9 @@ public void It_implicitly_defines_compilation_constants_for_the_target_platform( var itemGroup = new XElement(ns + "ItemGroup"); project.Root.Add(itemGroup); - foreach (var targetPlatform in sdkSupportedTargetPlatform) + foreach (var targetPlatform in sdkSupportedTargetPlatformVersion) { - itemGroup.Add(new XElement(ns + "SdkSupportedTargetPlatform", new XAttribute("Include", targetPlatform))); + itemGroup.Add(new XElement(ns + "SdkSupportedTargetPlatformVersion", new XAttribute("Include", targetPlatform))); } }); From a41778ae31b643a93949d13ca08e785ab0474242 Mon Sep 17 00:00:00 2001 From: Daniel Plaisted Date: Thu, 17 Sep 2020 11:04:39 -0700 Subject: [PATCH 7/8] Fix non .NET 5 projects with TargetPlatformMinVersion set --- ...osoft.NET.TargetFrameworkInference.targets | 3 ++- ...ntToBuildALibraryWithOSSupportedVersion.cs | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets index 8cbc18a86a94..add2325b5c7f 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.TargetFrameworkInference.targets @@ -179,7 +179,8 @@ Copyright (c) .NET Foundation. All rights reserved. ResourceName="NETFrameworkWithoutUsingNETSdkDefaults" /> - + Date: Thu, 17 Sep 2020 14:33:04 -0700 Subject: [PATCH 8/8] Switch tests to Windows only --- .../GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs index 7f6e3655a7a9..469166f2d256 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSSupportedVersion.cs @@ -150,7 +150,7 @@ public void WhenSupportedOSPlatformVersionIsHigherThanTargetPlatformVersionItSho .Fail().And.HaveStdOutContaining("NETSDK1135"); } - [Fact] + [WindowsOnlyFact] public void WhenTargetPlatformMinVersionIsSetForWindowsItIsUsedForTheSupportedOSPlatformAttribute() { TestProject testProject = SetUpProject("net5.0-windows10.0.19041"); @@ -167,7 +167,7 @@ public void WhenTargetPlatformMinVersionIsSetForWindowsItIsUsedForTheSupportedOS .And.HaveStdOutContaining(SupportedOSPlatformAttribute("Windows10.0.18362.0")); } - [Fact] + [WindowsOnlyFact] public void WhenTargetingWindowsSupportedOSVersionPropertySetsTargetPlatformMinVersion() { TestProject testProject = SetUpProject("net5.0-windows10.0.19041"); @@ -193,7 +193,7 @@ public void WhenTargetingWindowsSupportedOSVersionPropertySetsTargetPlatformMinV .BeEquivalentTo("10.0.18362.0"); } - [Fact] + [WindowsOnlyFact] public void WhenTargetingWindowsSupportedOSPlatformVersionPropertyIsPreferredOverTargetPlatformMinVersion() { TestProject testProject = SetUpProject("net5.0-windows10.0.19041");