Skip to content

Commit e1da68d

Browse files
[release/8.0] Update APICompat settings under source build (#93865)
* Update APICompat settings under source build * Update resolveContract.targets --------- Co-authored-by: Viktor Hofer <[email protected]>
1 parent 14a0bbc commit e1da68d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

eng/resolveContract.targets

+3-2
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,9 @@
7373
That is necessary as APICompat is invoked twice, once for the ref <-> src comparision and then again
7474
for the package validation (which doesn't include reference assemblies). As both operations don't have
7575
all the inputs available, some suppressions might only apply to one or the other and hence unnecessary
76-
suppressions can't be determined. -->
77-
<PropertyGroup Condition="'$(IsPackable)' == 'true' and '$(IsRuntimeAndReferenceAssembly)' != 'true'">
76+
suppressions can't be determined.
77+
Disable the validation under source build as that might use an out-of-date SDK and not the ApiCompat.Task package. -->
78+
<PropertyGroup Condition="('$(IsPackable)' == 'true' and '$(IsRuntimeAndReferenceAssembly)' != 'true') or '$(DotNetBuildFromSource)' == 'true'">
7879
<ApiCompatPreserveUnnecessarySuppressions>true</ApiCompatPreserveUnnecessarySuppressions>
7980
<ApiCompatPermitUnnecessarySuppressions>true</ApiCompatPermitUnnecessarySuppressions>
8081
</PropertyGroup>

0 commit comments

Comments
 (0)