Skip to content

Commit

Permalink
Only include PublicAPI.*.txt when PublicApiAnalyzers don't already do it
Browse files Browse the repository at this point in the history
  • Loading branch information
bash committed Nov 3, 2023
1 parent 208cee3 commit bc10a13
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Funcky/Funcky.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
</PropertyGroup>
<PropertyGroup>
<DefineConstants>$(DefineConstants);CONTRACTS_FULL</DefineConstants>
<TargetFrameworkForPublicApiAnalyzers>net7.0</TargetFrameworkForPublicApiAnalyzers>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="all" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" PrivateAssets="all" Condition="'$(TargetFramework)' == '$(TargetFrameworkForPublicApiAnalyzers)'" />
<PackageReference Include="Microsoft.Bcl.HashCode" Condition="'$(TargetFramework)' == 'netstandard2.0'" />
<PackageReference Include="Nullable" PrivateAssets="all" />
<PackageReference Include="IsExternalInit" PrivateAssets="all" />
Expand All @@ -33,7 +34,8 @@
<ItemGroup>
<ProjectReference Include="..\Funcky.SourceGenerator\Funcky.SourceGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<!-- These files are included by Microsoft.CodeAnalysis.PublicApiAnalyzers is included. -->
<ItemGroup Condition="'$(TargetFramework)' != '$(TargetFrameworkForPublicApiAnalyzers)'">
<AdditionalFiles Include="PublicAPI.Shipped.txt" />
<AdditionalFiles Include="PublicAPI.Unshipped.txt" />
</ItemGroup>
Expand Down

0 comments on commit bc10a13

Please sign in to comment.