Skip to content

Commit 7898f88

Browse files
authored
Fix GetTargetPath hook point
Same as dotnet/runtime#106553 I noticed that in some environments, the existing hook point (AfterTargets=GetTargetPathWithTargetPlatformMoniker) doesn't run before GetTargetPath. That resulted in some project compiling against the src instead of the ref assembly. DependsOnTargets + BeforeTargets="GetTargetPath" is is more correct anyway and works as exected.
1 parent c1423e0 commit 7898f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Compatibility/ApiCompat/Microsoft.DotNet.ApiCompat.Task/build/Microsoft.DotNet.ApiCompat.ValidateAssemblies.NonCrossTargeting.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@
5050
<!-- Annotate the TargetPath item to make the ApiCompatContractAssembly property accessible in the the cross-targeting build. -->
5151
<Target Name="ApiCompatAnnotateTargetPathWithTargetPlatformMoniker"
5252
Condition="'$(ApiCompatValidateAssemblies)' == 'true'"
53-
DependsOnTargets="GetApiCompatContractAssembly;GetReferencesForApiCompatValidateAssemblies"
54-
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
53+
DependsOnTargets="GetApiCompatContractAssembly;GetReferencesForApiCompatValidateAssemblies;GetTargetPathWithTargetPlatformMoniker"
54+
BeforeTargets="GetTargetPath">
5555
<ItemGroup>
5656
<TargetPathWithTargetPlatformMoniker ApiCompatContractAssembly="$(ApiCompatContractAssembly)"
5757
ApiCompatAssemblyReferences="@(ApiCompatAssemblyReferences, ',')"

0 commit comments

Comments
 (0)