Skip to content

Commit

Permalink
Fix GetTargetPath hook point
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ViktorHofer authored Aug 17, 2024
1 parent c1423e0 commit 7898f88
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<!-- Annotate the TargetPath item to make the ApiCompatContractAssembly property accessible in the the cross-targeting build. -->
<Target Name="ApiCompatAnnotateTargetPathWithTargetPlatformMoniker"
Condition="'$(ApiCompatValidateAssemblies)' == 'true'"
DependsOnTargets="GetApiCompatContractAssembly;GetReferencesForApiCompatValidateAssemblies"
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
DependsOnTargets="GetApiCompatContractAssembly;GetReferencesForApiCompatValidateAssemblies;GetTargetPathWithTargetPlatformMoniker"
BeforeTargets="GetTargetPath">
<ItemGroup>
<TargetPathWithTargetPlatformMoniker ApiCompatContractAssembly="$(ApiCompatContractAssembly)"
ApiCompatAssemblyReferences="@(ApiCompatAssemblyReferences, ',')"
Expand Down

0 comments on commit 7898f88

Please sign in to comment.