Skip to content

Commit d9e863a

Browse files
authored
Use PolySharp for [DynamicallyAccessedMembers] (#2883)
* Use PolySharp for DynamicallyAccessedMembersAttribute. * Generate only the necessary types.
1 parent be0ea1e commit d9e863a

File tree

4 files changed

+13
-140
lines changed

4 files changed

+13
-140
lines changed

src/BenchmarkDotNet.Annotations/Attributes/DynamicallyAccessedMemberTypes.cs

Lines changed: 0 additions & 90 deletions
This file was deleted.

src/BenchmarkDotNet.Annotations/Attributes/DynamicallyAccessedMembersAttribute.cs

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/BenchmarkDotNet.Annotations/BenchmarkDotNet.Annotations.csproj

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@
1111
<ProduceReferenceAssembly>True</ProduceReferenceAssembly>
1212
<Nullable>enable</Nullable>
1313
</PropertyGroup>
14+
<!-- Settings for PolySharp -->
15+
<PropertyGroup>
16+
<PolySharpIncludeGeneratedTypes>
17+
System.Diagnostics.CodeAnalysis.DynamicallyAccessedMembersAttribute,
18+
System.Diagnostics.CodeAnalysis.DynamicallyAccessedMemberTypes
19+
</PolySharpIncludeGeneratedTypes>
20+
</PropertyGroup>
21+
<ItemGroup>
22+
<PackageReference Include="PolySharp" Version="1.15.0">
23+
<PrivateAssets>all</PrivateAssets>
24+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25+
</PackageReference>
26+
</ItemGroup>
1427
<ItemGroup>
1528
<Compile Include="..\BenchmarkDotNet\Helpers\CodeAnnotations.cs" Link="Attributes\CodeAnnotations.cs" />
1629
</ItemGroup>

src/BenchmarkDotNet/BenchmarkDotNet.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,6 @@
5151
<ItemGroup>
5252
<ProjectReference Include="..\BenchmarkDotNet.Annotations\BenchmarkDotNet.Annotations.csproj" />
5353
</ItemGroup>
54-
<ItemGroup Condition=" '$(TargetFrameworkIdentifier)' == '.NETStandard' ">
55-
<Compile Include="..\BenchmarkDotNet.Annotations\Attributes\DynamicallyAccessedMembersAttribute.cs" Link="Properties\DynamicallyAccessedMembersAttribute.cs" />
56-
<Compile Include="..\BenchmarkDotNet.Annotations\Attributes\DynamicallyAccessedMemberTypes.cs" Link="Properties\DynamicallyAccessedMemberTypes.cs" />
57-
</ItemGroup>
5854
<ItemGroup>
5955
<Compile Include="..\BenchmarkDotNet.Disassembler.x64\DataContracts.cs" Link="Disassemblers\DataContracts.cs" />
6056
</ItemGroup>

0 commit comments

Comments
 (0)