|
71 | 71 |
|
72 | 72 | <!-- This Target is called early on in the chain for both single-RID and multi-RID containers - but for single-RID it's important
|
73 | 73 | that we ensure all of the data necessary to create a single-RID container is computed after we exit this target. -->
|
74 |
| - <Target Name="ComputeContainerConfig" DependsOnTargets="ComputeContainerBaseImage;_ComputeContainerExecutionArgs"> |
| 74 | + <Target Name="ComputeContainerConfig" DependsOnTargets="ComputeContainerBaseImage;_ContainerEstablishRIDNess;_ComputeContainerExecutionArgs"> |
75 | 75 | <PropertyGroup Label="VS defaults">
|
76 | 76 | <!-- RegistryUrl is used by existing VS targets for Docker builds - this lets us fill that void -->
|
77 | 77 | <ContainerRegistry Condition="'$(RegistryUrl)' != ''">$(RegistryUrl)</ContainerRegistry>
|
|
181 | 181 | <PropertyGroup>
|
182 | 182 | <PublishContainerDependsOn>
|
183 | 183 | _ContainerVerifySDKVersion;
|
184 |
| - _ContainerEstablishRIDNess; |
185 | 184 | ComputeContainerConfig;
|
186 |
| - _CheckContainersPackage |
| 185 | + _CheckContainersPackage; |
187 | 186 | </PublishContainerDependsOn>
|
188 | 187 | </PropertyGroup>
|
189 | 188 |
|
190 | 189 | <!-- These args are relevant to container execution and are per-RID by nature. Therefore they're a direct dependency of the _PublishSingleContainer
|
191 | 190 | target and not computed at the outer, multi-RID build layer. -->
|
192 |
| - <Target Name="_ComputeContainerExecutionArgs" Condition="'$(_IsSingleRIDBuild)' == 'true'"> |
| 191 | + <Target Name="_ComputeContainerExecutionArgs" DependsOnTargets="_ContainerEstablishRIDNess" Condition="'$(_IsSingleRIDBuild)' == 'true'"> |
193 | 192 | <PropertyGroup>
|
194 | 193 | <!-- The Container RID should default to the RID used for the entire build (to ensure things run on the platform they are built for), but the user knows best and so should be able to set it explicitly.
|
195 | 194 | For builds that have a RID, we default to that RID. Otherwise, we default to the Linux RID matching the architecture of the currently-executing SDK. -->
|
196 | 195 | <_ContainerIsTargetingWindows>false</_ContainerIsTargetingWindows>
|
197 | 196 | <_ContainerIsTargetingWindows Condition="$(ContainerRuntimeIdentifier.StartsWith('win'))">true</_ContainerIsTargetingWindows>
|
198 |
| - |
| 197 | + |
199 | 198 | <!-- Set the WorkingDirectory depending on the RID -->
|
200 | 199 | <ContainerWorkingDirectory Condition="'$(ContainerWorkingDirectory)' == '' and !$(_ContainerIsTargetingWindows)">/app/</ContainerWorkingDirectory>
|
201 | 200 | <ContainerWorkingDirectory Condition="'$(ContainerWorkingDirectory)' == '' and $(_ContainerIsTargetingWindows)">C:\app\</ContainerWorkingDirectory>
|
|
0 commit comments