From b4f76a11924d89a207b777b943d4b9481fe9b8ce Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Wed, 5 Aug 2020 11:00:56 +0200 Subject: [PATCH 1/4] rename MinimumOSPlatformAttribute -> SupportedOSPlatformAttribute --- .../targets/Microsoft.NET.GenerateAssemblyInfo.targets | 2 +- ...venThatWeWantToBuildALibraryWithOSMinimumVersion.cs | 10 +++++----- 2 files changed, 6 insertions(+), 6 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 28bcccbbb8f7..50fa0ed1cc13 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 @@ -120,7 +120,7 @@ Copyright (c) .NET Foundation. All rights reserved. and '$(MinimumOSPlatform)' != '' and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '5.0'))"> - + <_Parameter1>$(TargetPlatformIdentifier)$(MinimumOSPlatform) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs index 4787d3170f71..888ee72165d0 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToBuildALibraryWithOSMinimumVersion.cs @@ -32,7 +32,7 @@ public void WhenPropertiesAreNotSetItShouldNotGenerateMinimumOSPlatformAttribute } [Fact] - public void WhenPropertiesAreSetItCanGenerateMinimumOSPlatformAttribute() + public void WhenPropertiesAreSetItCanGenerateSupportedOSPlatformAttribute() { TestProject testProject = SetUpProject(); @@ -51,7 +51,7 @@ public void WhenPropertiesAreSetItCanGenerateMinimumOSPlatformAttribute() } [Fact] - public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerateMinimumOSPlatformAttribute() + public void WhenSupportedOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerateSupportedOSPlatformAttribute() { TestProject testProject = SetUpProject(); @@ -69,7 +69,7 @@ public void WhenMinimumOSPlatformISNotSetTargetPlatformVersionIsSetItCanGenerate } [Fact] - public void WhenMinimumOSPlatformIsHigherThanTargetPlatformVersionItShouldError() + public void WhenSupportedOSPlatformIsHigherThanTargetPlatformVersionItShouldError() { TestProject testProject = SetUpProject(); @@ -111,10 +111,10 @@ internal static class CustomAttributesTestApp public static void Main() { var assembly = typeof(CustomAttributesTestApp).Assembly; - object[] attributes = assembly.GetCustomAttributes(typeof(System.Runtime.Versioning.MinimumOSPlatformAttribute), false); + object[] attributes = assembly.GetCustomAttributes(typeof(System.Runtime.Versioning.SupportedOSPlatformAttribute), false); if (attributes.Length > 0) { - var attribute = attributes[0] as System.Runtime.Versioning.MinimumOSPlatformAttribute; + var attribute = attributes[0] as System.Runtime.Versioning.SupportedOSPlatformAttribute; Console.WriteLine($""PlatformName:{attribute.PlatformName}""); } else From 469d172ad40f9d6c98186fb8b7fa617bac6977d8 Mon Sep 17 00:00:00 2001 From: Adam Sitnik Date: Thu, 6 Aug 2020 14:34:32 +0200 Subject: [PATCH 2/4] rename MinimumOSPlatform to SupportedOSPlatform everywhere --- src/Tasks/Common/Resources/Strings.resx | 4 ++-- src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.de.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.es.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.it.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 6 +++--- src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 6 +++--- .../Microsoft.NET.GenerateAssemblyInfo.targets | 4 ++-- .../Microsoft.NET.TargetFrameworkInference.targets | 14 +++++++------- ...hatWeWantToBuildALibraryWithOSMinimumVersion.cs | 6 +++--- 17 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 2e42017880b4..79f482175dfb 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: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {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 cb10b3275430..fca504b19232 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -107,9 +107,9 @@ NETSDK1007: Nelze najít informace o projektu pro {0}. Může to znamenat chybějící odkaz na projekt. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index a2d8066e29f6..dcf30a18e57d 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -107,9 +107,9 @@ NETSDK1007: Die Projektinformationen für "{0}" wurden nicht gefunden. Dies ist möglicherweise auf einen fehlenden Projektverweis zurückzuführen. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 969f534516fe..d25e93fdbeba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -107,9 +107,9 @@ NETSDK1007: No se encuentra la información de proyecto de "{0}". Esto puede indicar que falta una referencia de proyecto. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 6975a6b09192..62c84b932412 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -107,9 +107,9 @@ NETSDK1007: Les informations relatives au projet sont introuvables pour '{0}'. Cela peut indiquer une référence de projet manquante. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index ae82d581d800..05c18060cfa4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -107,9 +107,9 @@ 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: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index 470deee49b05..50338d0f3b9e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -107,9 +107,9 @@ NETSDK1007: '{0}' のプロジェクト情報が見つかりません。これは、プロジェクト参照がないことを示している可能性があります。 {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 9dc0752a4413..33d798cc6a8e 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -107,9 +107,9 @@ NETSDK1007: '{0}'에 대한 프로젝트 정보를 찾을 수 없습니다. 프로젝트 참조가 없음을 나타낼 수 있습니다. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 67dd5dcf21ae..c9a79d723319 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -107,9 +107,9 @@ NETSDK1007: Nie odnaleziono informacji o projekcie dla elementu „{0}”. Może to wskazywać na brakujące odwołanie do projektu. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 94ca968d02a7..7379e1b7fcb0 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -107,9 +107,9 @@ 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: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index 86d0743aebd9..1f617e383cba 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -107,9 +107,9 @@ NETSDK1007: не удается найти сведения о проекте "{0}". Возможно, отсутствует ссылка на проект. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 870ba3662669..538c9e6d1497 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -107,9 +107,9 @@ NETSDK1007: '{0}' için proje bilgisi bulunamıyor. Bu durum, bir proje başvurusunun eksik olduğunu gösteriyor olabilir. {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index 044093ed2d33..cd080525e6f6 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -107,9 +107,9 @@ NETSDK1007: 找不到“{0}”的项目信息。这可以指示缺少一个项目引用。 {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index 32657fb96aab..b36d59209050 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -107,9 +107,9 @@ NETSDK1007: 找不到 '{0}' 的專案資訊。這可能表示遺漏專案參考。 {StrBegin="NETSDK1007: "} - - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. - NETSDK1135: MinimumOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. + NETSDK1135: SupportedOSPlatform {0} cannot be higher than TargetPlatformVersion {1}. {StrBegin="NETSDK1135: "} 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 50fa0ed1cc13..999f731cb774 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,11 +117,11 @@ Copyright (c) .NET Foundation. All rights reserved. - <_Parameter1>$(TargetPlatformIdentifier)$(MinimumOSPlatform) + <_Parameter1>$(TargetPlatformIdentifier)$(SupportedOSPlatform) 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 945907353355..775876df4adb 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 @@ -88,9 +88,9 @@ Copyright (c) .NET Foundation. All rights reserved. <_UnsupportedTargetFrameworkError>true - - - $(TargetPlatformVersion) + + + $(TargetPlatformVersion)