Skip to content

Commit 909df99

Browse files
Merge pull request #2160 from ds5678/trim-support
Assembly Trimming Support
2 parents 29320a6 + d14e712 commit 909df99

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/ImageSharp/ImageSharp.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
<When Condition="$(SIXLABORS_TESTING_PREVIEW) == true">
2525
<PropertyGroup>
2626
<TargetFrameworks>net7.0;net6.0</TargetFrameworks>
27+
<IsTrimmable>true</IsTrimmable>
2728
</PropertyGroup>
2829
</When>
2930
<Otherwise>
3031
<PropertyGroup>
3132
<TargetFrameworks>net6.0</TargetFrameworks>
33+
<IsTrimmable>true</IsTrimmable>
3234
</PropertyGroup>
3335
</Otherwise>
3436
</Choose>

src/ImageSharp/Metadata/Profiles/Exif/ExifTagDescriptionAttribute.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public ExifTagDescriptionAttribute(object value, string description)
3232
public static string GetDescription(ExifTag tag, object value)
3333
{
3434
var tagValue = (ExifTagValue)(ushort)tag;
35-
FieldInfo field = tagValue.GetType().GetTypeInfo().GetDeclaredField(tagValue.ToString());
35+
FieldInfo field = typeof(ExifTagValue).GetField(tagValue.ToString(), BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static);
3636

3737
if (field is null)
3838
{

0 commit comments

Comments
 (0)