Skip to content

Commit 8900722

Browse files
authored
Merge branch 'main' into api-deferredrracerproviderbuilder2
2 parents b8d1bcc + b6d4e88 commit 8900722

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

build/Common.prod.props

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,25 @@
1010
<PrivateAssets>All</PrivateAssets>
1111
</PackageReference>
1212
</ItemGroup>
13+
1314
<ItemGroup Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true'">
1415
<PackageReference Include="Microsoft.DotNet.ApiCompat" Version="6.0.0-beta.21308.1" PrivateAssets="All" />
1516
<ResolvedMatchingContract Include="..\LastMajorVersionBinaries\$(AssemblyName)\$(OTelPreviousStableVer)\lib\$(TargetFramework)\$(AssemblyName).dll" />
1617
</ItemGroup>
18+
1719
<Target Name="PreBuild" BeforeTargets="PreBuildEvent" Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true'">
1820
<Exec Command="powershell -ExecutionPolicy Unrestricted -File &quot;$(RepoRoot)\build\PreBuild.ps1&quot; -package $(AssemblyName) -version &quot;$(OTelPreviousStableVer)&quot;" />
1921
</Target>
2022

23+
<Target Name="FindContractDependencyPaths" BeforeTargets="ValidateApiCompatForSrc" AfterTargets="ResolveAssemblyReferences" Condition="'$(MinVerTagPrefix)' == 'core-' AND '$(CheckAPICompatibility)' == 'true'">
24+
<ItemGroup>
25+
<_ReferencePathDirectories Include="@(ReferencePath -> '%(RootDir)%(Directory)')" />
26+
</ItemGroup>
27+
<PropertyGroup>
28+
<ContractDependencyPaths>@(_ReferencePathDirectories->Distinct())</ContractDependencyPaths>
29+
</PropertyGroup>
30+
</Target>
31+
2132
<PropertyGroup>
2233
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)/OpenTelemetry.prod.ruleset</CodeAnalysisRuleSet>
2334
<NoWarn>$(NoWarn),1573,1712</NoWarn>

0 commit comments

Comments
 (0)