Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update targets to work correctly with 8.0.100-rc2 and up #4201

Merged
merged 2 commits into from
Jan 11, 2024
Merged
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
10 changes: 8 additions & 2 deletions resources/netCore/GetProjectProperties.targets
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<Project>
<PropertyGroup>
<GetProjectPropertiesDependsOn Condition=" '$(SDKContainerSupportEnabled)' == 'true' ">$(GetProjectPropertiesDependsOn);ComputeContainerConfig;</GetProjectPropertiesDependsOn>
<!-- Handle the varying properties across the SDK version/PackageReference methods for enabling containerization.
For the PackageReference, SDKContainerSupportEnabled is present. For the SDK built-in version, EnableSdkContainerSupport is the primary flag.
Certain project types have it set automatically, while others require users to manually set the property.
So for compat, we need to make sure and be responsive to both flags to check if a project supports containerization. -->
<EnableSdkContainerSupport Condition=" '$(EnableSdkContainerSupport)' == '' ">$(SDKContainerSupportEnabled)</EnableSdkContainerSupport>
<GetProjectPropertiesDependsOn Condition=" '$(EnableSdkContainerSupport)' == 'true' ">$(GetProjectPropertiesDependsOn);ComputeContainerConfig;</GetProjectPropertiesDependsOn>

</PropertyGroup>

<Target Name="GetProjectProperties" DependsOnTargets="$(GetProjectPropertiesDependsOn)">
Expand All @@ -14,7 +20,7 @@
$(TargetFramework)$(TargetFrameworks.Split(';')[0])
$(OutputPath)$(AssemblyName).dll
$(ContainerWorkingDirectory)/$(AssemblyName).dll
$(SDKContainerSupportEnabled)
$(EnableSdkContainerSupport)
$(InferImageName)"
Overwrite="True" />
</Target>
Expand Down