Skip to content

Commit

Permalink
Update targets to work correctly with 8.0.100-rc2 and up (#4201)
Browse files Browse the repository at this point in the history
* Update targets to work correctly with 8.0.100-rc2 and up

* Update resources/netCore/GetProjectProperties.targets

Co-authored-by: Chet Husk <[email protected]>

---------

Co-authored-by: Chet Husk <[email protected]>
  • Loading branch information
bwateratmsft and baronfel authored Jan 11, 2024
1 parent 5fa4733 commit b182624
Showing 1 changed file with 8 additions and 2 deletions.
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

0 comments on commit b182624

Please sign in to comment.