From 3cb672225a4ea847ea6e4081dabea021bc846c01 Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 25 Aug 2022 11:17:15 -0500 Subject: [PATCH 1/2] guardrail to prevent use from unsupported SDK --- .../build/Microsoft.NET.Build.Containers.targets | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets b/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets index d27e5687..c292cef6 100644 --- a/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets +++ b/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets @@ -1,4 +1,11 @@ + + + <_IsAllowedVersion Condition="$(NETCoreSdkVersion.StartsWith('7.0.100-preview.7')) or $(NETCoreSdkVersion.StartsWith('7.0.100-rc')) or $(NETCoreSdkVersion.StartsWith('7.0.100'))">true + + + + @@ -58,6 +65,7 @@ + _ContainerVerifySDKVersion; ComputeContainerConfig From 7363854ce5030435d47e2776d9d52d63b161ce3b Mon Sep 17 00:00:00 2001 From: Chet Husk Date: Thu, 25 Aug 2022 12:31:15 -0500 Subject: [PATCH 2/2] add an error that prevents usage on unsupported SDKs --- .../build/Microsoft.NET.Build.Containers.targets | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets b/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets index c292cef6..398967bd 100644 --- a/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets +++ b/Microsoft.NET.Build.Containers/build/Microsoft.NET.Build.Containers.targets @@ -1,9 +1,16 @@ - + + - <_IsAllowedVersion Condition="$(NETCoreSdkVersion.StartsWith('7.0.100-preview.7')) or $(NETCoreSdkVersion.StartsWith('7.0.100-rc')) or $(NETCoreSdkVersion.StartsWith('7.0.100'))">true + + <_IsAllowedVersion Condition="$(NETCoreSdkVersion.StartsWith('7.0.100-preview.7')) or $(NETCoreSdkVersion.StartsWith('7.0.100-rc')) or ($(NETCoreSdkVersion.StartsWith('7.0.10')) and $(NETCoreSdkVersion.Contains('-')) == false)">true - +