diff --git a/src/ImageSharp/Common/Helpers/Guard.cs b/src/ImageSharp/Common/Helpers/Guard.cs index 8ce6c4b4d..0b5cc21cb 100644 --- a/src/ImageSharp/Common/Helpers/Guard.cs +++ b/src/ImageSharp/Common/Helpers/Guard.cs @@ -2,7 +2,9 @@ // Licensed under the Apache License, Version 2.0. using System; +#if NETSTANDARD1_3 using System.Reflection; +#endif using System.Runtime.CompilerServices; using SixLabors.ImageSharp; @@ -20,7 +22,11 @@ namespace SixLabors [MethodImpl(InliningOptions.ShortMethod)] public static void MustBeValueType(TValue value, string parameterName) { - if (value.GetType().GetTypeInfo().IsValueType) + if (value.GetType() +#if NETSTANDARD1_3 + .GetTypeInfo() +#endif + .IsValueType) { return; }