diff --git a/src/Microsoft.DotNet.ApiCompat/build/Microsoft.DotNet.ApiCompat.targets b/src/Microsoft.DotNet.ApiCompat/build/Microsoft.DotNet.ApiCompat.targets
index 8f492a1b661..52fa977d133 100644
--- a/src/Microsoft.DotNet.ApiCompat/build/Microsoft.DotNet.ApiCompat.targets
+++ b/src/Microsoft.DotNet.ApiCompat/build/Microsoft.DotNet.ApiCompat.targets
@@ -68,7 +68,7 @@
$(ApiCompatArgs) --exclude-attributes "$(ApiCompatExcludeAttributeList)"
$(ApiCompatArgs) --enforce-optional-rules
$(ApiCompatArgs) --baseline "$(ApiCompatBaseline)"
- $(ApiCompatArgs) --impl-dirs "@(_DependencyDirectories, ','),"
+ $(ApiCompatArgs) --impl-dirs "$(IntermediateOutputPath),@(_DependencyDirectories, ','),"
$(ApiCompatArgs) $(AdditionalApiCompatOptions)
> "$(ApiCompatBaseline)"
0
@@ -123,7 +123,7 @@
$(MatchingRefApiCompatArgs) "$(ImplementationAssemblyAsContract)"
- $(MatchingRefApiCompatArgs) --contract-depends "@(_ContractDependencyDirectories, ','),"
+ $(MatchingRefApiCompatArgs) --contract-depends "$(IntermediateOutputPath),@(_ContractDependencyDirectories, ','),"
$(MatchingRefApiCompatArgs) --left-operand implementation
$(MatchingRefApiCompatArgs) --right-operand reference
$(MatchingRefApiCompatArgs) --exclude-attributes "$(ApiCompatExcludeAttributeList)"