Skip to content

Commit

Permalink
Use GetCustomAttributes instead of GetCustomAttribute
Browse files Browse the repository at this point in the history
GetCustomAttribute is not part of net35
  • Loading branch information
ghorsington committed Nov 30, 2020
1 parent 821ad5f commit cfa6857
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BepInEx.Core/Paths.cs
@@ -1,6 +1,6 @@
using System.IO;
using System.Linq;
using System.Reflection;
using BepInEx.Core;
using MonoMod.Utils;

namespace BepInEx
Expand Down Expand Up @@ -34,7 +34,7 @@ internal static void SetPluginPath(string pluginPath)
PluginPath = Utility.CombinePaths(BepInExRootPath, pluginPath);
}

public static SemVer.Version BepInExVersion { get; } = SemVer.Version.Parse(typeof(Paths).Assembly.GetCustomAttribute<AssemblyInformationalVersionAttribute>().InformationalVersion);
public static SemVer.Version BepInExVersion { get; } = SemVer.Version.Parse(typeof(Paths).Assembly.GetCustomAttributes(typeof(AssemblyInformationalVersionAttribute), false).Cast<AssemblyInformationalVersionAttribute>().First().InformationalVersion);

/// <summary>
/// The directory that the core BepInEx DLLs reside in.
Expand Down

0 comments on commit cfa6857

Please sign in to comment.