Skip to content

Commit 0fca85f

Browse files
authored
Fix GetTargetPath hook point (#106553)
I noticed that in some environments, the existing hook point (AfterTargets=GetTargetPathWithTargetPlatformMoniker) doesn't work. 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 418c3b9 commit 0fca85f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

eng/illink.targets

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@
7373
<!-- Flow the ILLinkSuppressionsXmls item list down to consuming projects, in order for sfx.proj and oob.proj to
7474
receive the suppression files. -->
7575
<Target Name="AnnotateTargetPathWithILLinkSuppressionsXmlsProp"
76-
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
76+
DependsOnTargets="GetTargetPathWithTargetPlatformMoniker"
77+
BeforeTargets="GetTargetPath">
7778
<ItemGroup>
7879
<TargetPathWithTargetPlatformMoniker ILLinkSuppressionsXmls="@(ILLinkSuppressionsXmls->Metadata('FullPath'))" />
7980
</ItemGroup>

eng/intellisense.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666

6767
<!-- Allow P2Ps to retrieve the DocFileItem path. -->
6868
<Target Name="AnnotateTargetPathWithTargetPlatformMonikerWithDocFileItem"
69-
DependsOnTargets="ChangeDocumentationFileForPackaging"
70-
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
69+
DependsOnTargets="ChangeDocumentationFileForPackaging;GetTargetPathWithTargetPlatformMoniker"
70+
BeforeTargets="GetTargetPath">
7171
<ItemGroup>
7272
<TargetPathWithTargetPlatformMoniker DocFileItem="@(DocFileItem)" />
7373
</ItemGroup>

eng/resolveContract.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939
<!-- Allow P2Ps that target a source project to build against the corresponding ref project. -->
4040
<Target Name="AnnotateTargetPathWithTargetPlatformMonikerWithReferenceAssembly"
4141
Condition="'$(AnnotateTargetPathWithContract)' == 'true'"
42-
DependsOnTargets="ResolveProjectReferences"
43-
AfterTargets="GetTargetPathWithTargetPlatformMoniker">
42+
DependsOnTargets="ResolveProjectReferences;GetTargetPathWithTargetPlatformMoniker"
43+
BeforeTargets="GetTargetPath">
4444
<ItemGroup>
4545
<TargetPathWithTargetPlatformMoniker ReferenceAssembly="@(ResolvedMatchingContract)" />
4646
</ItemGroup>

0 commit comments

Comments
 (0)