You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OR ( $([MSBuild]::VersionEquals($(NetCoreSdkVersion), 7.0.100))
8
+
AND (
9
+
$(NETCoreSdkVersion.Contains('-preview.7'))
10
+
OR $(NETCoreSdkVersion.Contains('-rc'))
11
+
OR $(NETCoreSdkVersion.Contains('-')) == false
12
+
)
13
+
)">true</_IsSDKContainerAllowedVersion>
14
+
</PropertyGroup>
15
+
2
16
<TargetName="_ContainerVerifySDKVersion"
3
17
Condition="'$(WebPublishMethod)' == 'Container' or '$(PublishProfile)' == 'DefaultContainer'"
4
18
BeforeTargets="AfterPublish">
5
19
<!-- If the user has opted into container publishing via their own profile (WebPublishMethod = Container) or
6
20
via the default Profile (PublishProfile = DefaultContainer), make sure they're on a supported SDK version.
7
21
We do the explicit profile name check here because for preview6 for example the profile didn't exist, so we
8
22
can't rely only on the WebPublishMethod. -->
9
-
<PropertyGroup>
10
-
<!-- Allow preview 7, any RC, or any stable version of 7 -->
11
-
<_IsAllowedVersionCondition="$(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</_IsAllowedVersion>
12
-
</PropertyGroup>
13
-
<ErrorCondition="'$(_IsAllowedVersion)' != 'true'"Code="CONTAINER002"Text="The current .NET SDK ($(NETCoreSdkVersion)) doesn't support containerization. Please use version 7.0.100-preview.7 or higher." />
23
+
<ErrorCondition="'$(_IsSDKContainerAllowedVersion)' != 'true'"Code="CONTAINER002"Text="The current .NET SDK ($(NETCoreSdkVersion)) doesn't support containerization. Please use version 7.0.100 or higher to enable containerization." />
0 commit comments