diff --git a/Octokit/Http/SimpleJsonSerializer.cs b/Octokit/Http/SimpleJsonSerializer.cs index 07f59833..825279b5 100644 --- a/Octokit/Http/SimpleJsonSerializer.cs +++ b/Octokit/Http/SimpleJsonSerializer.cs @@ -80,11 +80,14 @@ namespace Octokit.Internal { var type = p.GetType(); var name = Enum.GetName(type, p); +#if NETFX_CORE + var attr = type.GetTypeInfo().GetCustomAttribute(); +#else var attr = type.GetField(name) .GetCustomAttributes(false) .OfType() .SingleOrDefault(); - +#endif if (attr != null) return attr.Value;