Improved IsOldPkhexCorePresent (#3541)

This commit is contained in:
BlackShark 2022-06-28 07:32:03 +02:00 committed by GitHub
parent 1f64a41670
commit 7e7b2bb2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View file

@ -12,6 +12,7 @@
<NeutralLanguage>en</NeutralLanguage>
<Company>Project Pokémon</Company>
<Copyright>Kaphotics</Copyright>
<Version>22.06.26</Version>
</PropertyGroup>
<PropertyGroup>

View file

@ -130,7 +130,7 @@ namespace PKHeX.WinForms
private static bool IsOldPkhexCorePresent(Exception? ex)
{
return ex is MissingMethodException
return ex is MissingMethodException or TypeLoadException or TypeInitializationException
&& File.Exists("PKHeX.Core.dll")
&& AssemblyName.GetAssemblyName("PKHeX.Core.dll").Version < Assembly.GetExecutingAssembly().GetName().Version;
}