Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Throw error on PublishContainer when EnableSdkContainerSupport is not true #47047

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@

<Target Name="PublishContainer"
DependsOnTargets="$(PublishContainerDependsOn)"
Condition="'$(IsPublishable)' == 'true' AND '$(EnableSdkContainerSupport)' == 'true'">
Condition="'$(IsPublishable)' == 'true'">
<PropertyGroup>
<_IsMultiTFMBuild Condition="'$(TargetFrameworks)' != '' and '$(TargetFramework)' == ''">true</_IsMultiTFMBuild>
<!-- we are multi-RID if:
Expand All @@ -424,6 +424,7 @@
<CallTarget Condition="'$(_IsSingleRIDBuild)' == 'true' " Targets="_PublishSingleContainer" />

<Error Condition="'$(_IsMultiTFMBuild)' == 'true'" Code="CONTAINERS0666" Text="Containers cannot be published for multiple TargetFrameworks at this time. Please specify a TargetFramework." />
<Error Condition="'$(EnableSdkContainerSupport)' != 'true'" Code="CONTAINERS0667" Text="Publishing to container requires EnableSdkContainerSupport be set to true." />
</Target>

</Project>
Loading