From 415a0065e5026406c81abc40aafa99b1d4af217f Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 27 Sep 2022 17:00:08 -0700 Subject: [PATCH 1/5] Add warning when targeting 7.0 in 17.3 and remove 7.0 from the list of supported targets. --- src/Tasks/Common/Resources/Strings.resx | 4 ++++ src/Tasks/Common/Resources/xlf/Strings.cs.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.de.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.es.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.fr.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.it.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ja.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ko.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.pl.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.ru.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.tr.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf | 5 +++++ src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf | 5 +++++ .../targets/Microsoft.NET.Sdk.DefaultItems.targets | 6 ++++++ .../targets/Microsoft.NET.SupportedTargetFrameworks.props | 3 ++- 16 files changed, 77 insertions(+), 1 deletion(-) diff --git a/src/Tasks/Common/Resources/Strings.resx b/src/Tasks/Common/Resources/Strings.resx index 1372774cef27..1b1faf9abff2 100644 --- a/src/Tasks/Common/Resources/Strings.resx +++ b/src/Tasks/Common/Resources/Strings.resx @@ -871,4 +871,8 @@ You may need to build the project on another operating system or architecture, o NETSDK1191: A runtime identifier for the property '{0}' couldn't be inferred. Specify a rid explicitly. {StrBegin="NETSDK1191: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + diff --git a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf index 2bac98ba8b0c..9cae172df051 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.cs.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.cs.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: Cílení na .NET 6.0 nebo vyšší ve Visual Studio 2019 se nepodporuje. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: Pro zadaný identifikátor RuntimeIdentifier {0} není k dispozici žádný hostitel aplikace. diff --git a/src/Tasks/Common/Resources/xlf/Strings.de.xlf b/src/Tasks/Common/Resources/xlf/Strings.de.xlf index 0ebf4b06648f..3c5fbc3f09fb 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.de.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.de.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: .NET 6.0 oder höher wird als Ziel in Visual Studio 2019 nicht unterstützt. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: Für den angegebenen RuntimeIdentifier "{0}" ist kein Anwendungshost verfügbar. diff --git a/src/Tasks/Common/Resources/xlf/Strings.es.xlf b/src/Tasks/Common/Resources/xlf/Strings.es.xlf index 897554ebb2d2..6121f4020392 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.es.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.es.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: No se admite el destino de .NET 6.0 o superior en Visual Studio 2019. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: No hay ningún host de aplicación disponible para el valor de RuntimeIdentifier especificado "{0}". diff --git a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf index 4533fda698a9..c8011a2ef6e4 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.fr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.fr.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: le ciblage de .NET 6.0 ou plus dans Visual Studio 2019 n’est pas pris en charge. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: il n'existe aucun d'hôte d'application disponible pour le RuntimeIdentifier spécifié '{0}'. diff --git a/src/Tasks/Common/Resources/xlf/Strings.it.xlf b/src/Tasks/Common/Resources/xlf/Strings.it.xlf index 687dc87da471..2109529788d9 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.it.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.it.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: la destinazione .NET 6.0 o versione successiva in Visual Studio 2019 non è supportata. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: non è disponibile alcun host applicazione per l'elemento RuntimeIdentifier specificato '{0}'. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf index bddaee936f98..72200fa0a601 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ja.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ja.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: Visual Studio 2019 では .NET 6.0 以降をターゲットにすることはできません。 {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: 指定された RuntimeIdentifier '{0}' で利用できるアプリケーション ホストはありません。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf index 0a01db3d5c76..ca2c91d5c3a1 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ko.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ko.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: Visual Studio 2019에서 .NET 6.0 이상을 대상으로 하는 것은 지원되지 않습니다. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: 지정된 RuntimeIdentifier '{0}'에 사용할 수 있는 애플리케이션 호스트가 없습니다. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf index 6d0986d2a2cb..8449f28055dc 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pl.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pl.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: Platforma docelowa .NET 6.0 lub nowsza w usłudze Visual Studio 2019 nie jest obsługiwana. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: Brak dostępnej aplikacji hosta dla określonego elementu RuntimeIdentifier „{0}”. diff --git a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf index 6c6a36e5fa1d..8964e711b1ff 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.pt-BR.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: o direcionamento do .NET 6.0 ou superior no Visual Studio 2019 não é compatível. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: não há nenhum host do aplicativo disponível para o RuntimeIdentifier especificado '{0}'. diff --git a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf index d3347bdbe6f4..9fb52753f7b8 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.ru.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.ru.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: выбор .NET 6.0 или более поздней версии в качестве цели в Visual Studio 2019 не поддерживается. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: нет узла приложения для указанного RuntimeIdentifier "{0}". diff --git a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf index 9e284d7e47ce..736c5276b280 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.tr.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.tr.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: Visual Studio 2019'da .NET 6.0 veya daha üst sürümünü hedefleme desteklenmiyor. {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: Belirtilen RuntimeIdentifier '{0}' için kullanılabilecek bir uygulama konağı yok. diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf index ac1932748860..b245ebe4ad9f 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hans.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: 不支持在 Visual Studio 2019 中以 .NET 6.0 或更高版本为目标。 {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: 没有应用程序主机可用于指定的 RuntimeIdentifier“{0}”。 diff --git a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf index b1e292eb81ad..9568f87fd669 100644 --- a/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf +++ b/src/Tasks/Common/Resources/xlf/Strings.zh-Hant.xlf @@ -580,6 +580,11 @@ The following are names of parameters or literal values and should not be transl NETSDK1182: 不支援在 Visual Studio 2019 中以 .NET 6.0 或更高版本為目標。 {StrBegin="NETSDK1182: "} + + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + NETSDK1192: Targeting .NET 7.0 or higher in Visual Studio 2022 17.3 is not supported. + {StrBegin="NETSDK1192: "} + NETSDK1084: There is no application host available for the specified RuntimeIdentifier '{0}'. NETSDK1084: 對指定的 RuntimeIdentifier '{0}',無法使用任何應用程式主機。 diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets index 9ab8e32a4c5d..165cef242260 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets @@ -134,6 +134,12 @@ Copyright (c) .NET Foundation. All rights reserved. + + + + diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props index 284dc3482867..90d1a91cea84 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props @@ -24,7 +24,8 @@ Copyright (c) .NET Foundation. All rights reserved. - + From a26437ee9ee076a249a525456a013fdb356f2124 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Thu, 29 Sep 2022 13:55:10 -0700 Subject: [PATCH 2/5] Fix up tests that include the new target net7 on 17.3 warning to only run on 17.4 and up --- .../GivenThatWeWantToControlGeneratedAssemblyInfo.cs | 2 +- .../Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs | 2 +- src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs index 3ba7af9fa07a..5a42e6346746 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs @@ -757,7 +757,7 @@ public void It_does_not_write_to_undefined_assembly_metadata_attribute(string ta } } - [Theory] + [RequiresMSBuildVersionTheory("17.4")] [InlineData("netcoreapp3.1", ".NET Core 3.1")] [InlineData("netcoreapp2.1", ".NET Core 2.1")] [InlineData("netstandard2.1", ".NET Standard 2.1")] diff --git a/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs b/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs index 239f426bcdc5..3af3c93e8250 100644 --- a/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs +++ b/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs @@ -24,7 +24,7 @@ public GivenThatWeWantToCleanAHelloWorldProject(ITestOutputHelper log) : base(lo { } - [RequiresMSBuildVersionFact("17.0.0")] + [RequiresMSBuildVersionFact("17.4.0")] public void It_cleans_without_logging_assets_message() { var testAsset = _testAssetsManager diff --git a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index c2871b869b4b..13be06673dd5 100644 --- a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -140,7 +140,7 @@ public void ItRunsWhenRestoringToSpecificPackageDir() .And.HaveStdOutContaining("Hello World"); } - [Fact] + [RequiresMSBuildVersionFact("17.4.0")] public void ItPrintsBuildSummary() { var testAppName = "MSBuildTestApp"; From 8d23cce68b510aeba3e3cdd1ac1a295c895da288 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 4 Oct 2022 10:38:39 -0700 Subject: [PATCH 3/5] Fix message to trigger on earlier than 17.4 rather than 17.3. --- .../targets/Microsoft.NET.Sdk.DefaultItems.targets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets index 165cef242260..3751291ee646 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets @@ -134,9 +134,9 @@ Copyright (c) .NET Foundation. All rights reserved. - + Condition="$([MSBuild]::VersionLessThan($(VisualStudioVersion), '17.4')) and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '7.0'))"> From 045b56d8d8865e8f2584563ba5a7a38ca46e208d Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Tue, 4 Oct 2022 15:35:42 -0700 Subject: [PATCH 4/5] VisualStudioVersion is actually 17.0 in the VS command prompt even in 17.4. Switching to check msbuild version as that works here though not sure what we do in the future if we truly need vs version. --- .../targets/Microsoft.NET.Sdk.DefaultItems.targets | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets index 3751291ee646..249c9cb824c2 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.Sdk.DefaultItems.targets @@ -136,7 +136,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="$([MSBuild]::VersionLessThan($(MSBuildVersion), '17.4.0')) and '$(TargetFrameworkIdentifier)' == '.NETCoreApp' and $([MSBuild]::VersionGreaterThanOrEquals($(_TargetFrameworkVersionWithoutV), '7.0'))"> From 2fcce3deabbf3bc28e459fcef19b10ca2980a250 Mon Sep 17 00:00:00 2001 From: Marc Paine Date: Wed, 5 Oct 2022 11:26:05 -0700 Subject: [PATCH 5/5] Revert the test changes that are no longer needed because of the prior bad VSVersion logic. Update the logic to consistently use the three part version (even though it doesn't matter) --- .../targets/Microsoft.NET.SupportedTargetFrameworks.props | 2 +- .../GivenThatWeWantToControlGeneratedAssemblyInfo.cs | 2 +- .../Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs | 2 +- src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props index 90d1a91cea84..bb64abcdc527 100644 --- a/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props +++ b/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.SupportedTargetFrameworks.props @@ -25,7 +25,7 @@ Copyright (c) .NET Foundation. All rights reserved. + Condition="$([MSBuild]::VersionGreaterThanOrEquals($(MSBuildVersion), '17.4.0'))"/> diff --git a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs index 5a42e6346746..3ba7af9fa07a 100644 --- a/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs +++ b/src/Tests/Microsoft.NET.Build.Tests/GivenThatWeWantToControlGeneratedAssemblyInfo.cs @@ -757,7 +757,7 @@ public void It_does_not_write_to_undefined_assembly_metadata_attribute(string ta } } - [RequiresMSBuildVersionTheory("17.4")] + [Theory] [InlineData("netcoreapp3.1", ".NET Core 3.1")] [InlineData("netcoreapp2.1", ".NET Core 2.1")] [InlineData("netstandard2.1", ".NET Standard 2.1")] diff --git a/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs b/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs index 3af3c93e8250..239f426bcdc5 100644 --- a/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs +++ b/src/Tests/Microsoft.NET.Clean.Tests/GivenThatWeWantToCleanAProject.cs @@ -24,7 +24,7 @@ public GivenThatWeWantToCleanAHelloWorldProject(ITestOutputHelper log) : base(lo { } - [RequiresMSBuildVersionFact("17.4.0")] + [RequiresMSBuildVersionFact("17.0.0")] public void It_cleans_without_logging_assets_message() { var testAsset = _testAssetsManager diff --git a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs index 13be06673dd5..c2871b869b4b 100644 --- a/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs +++ b/src/Tests/dotnet-build.Tests/GivenDotnetBuildBuildsCsproj.cs @@ -140,7 +140,7 @@ public void ItRunsWhenRestoringToSpecificPackageDir() .And.HaveStdOutContaining("Hello World"); } - [RequiresMSBuildVersionFact("17.4.0")] + [Fact] public void ItPrintsBuildSummary() { var testAppName = "MSBuildTestApp";