Skip to content

Commit

Permalink
Fix ApiCompat for OpenTelemetry.Api's net6.0 target.
Browse files Browse the repository at this point in the history
Since the previous version doesn't have a net6.0 target, run ApiCompat for net6.0 against the netstandard2.0 target.
  • Loading branch information
eerhardt committed May 22, 2023
1 parent 19fce6a commit 35173c8
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/OpenTelemetry.Api/OpenTelemetry.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,14 @@
<PackageReference Include="System.Diagnostics.DiagnosticSource" />
</ItemGroup>

<!--
v1.4.0 doesn't contain a net6.0 target, so we can't run ApiCompat against it.
Instead, run net6.0's ApiCompat check against netstandard2.0.
Remove this once 1.5.0 is released.
-->
<ItemGroup Condition="'$(CheckAPICompatibility)' == 'true' and '$(TargetFramework)' == 'net6.0'">
<ResolvedMatchingContract Remove="$(RepoRoot)\build\LastMajorVersionBinaries\$(AssemblyName)\$(OTelPreviousStableVer)\lib\$(TargetFramework)\$(AssemblyName).dll" />
<ResolvedMatchingContract Include="$(RepoRoot)\build\LastMajorVersionBinaries\$(AssemblyName)\$(OTelPreviousStableVer)\lib\netstandard2.0\$(AssemblyName).dll" />
</ItemGroup>

</Project>

0 comments on commit 35173c8

Please sign in to comment.