Jump to content
Sign in to follow this  
Wanderer1391

bug Illegal Mode Issue

Recommended Posts

In the latest commits starting with the update to convert PKHeX Core to a .Net Standard library Illegal mode no longer starts and instead throws an error message. I've put the error message in this spoiler below, please inform me if you require any more information.

Spoiler

Exception Details:
System.IO.FileLoadException: Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
File name: 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
   at PKHeX.Core.Legal.RefreshMGDB(String localDbPath)
   at PKHeX.WinForms.Main..ctor()
   at PKHeX.WinForms.Program.StartPKHeX()
   at PKHeX.WinForms.Program.Main()

Also a feature request, would it be possible to add support for the N64 Pokemon Stadium games at some point in the future?

Share this post


Link to post
Share on other sites

Works fine for me.

The error means you need to have those dll's in the same folder as the exe. Rebuild the solution or just delete the output folders and try again :)

yi20dJx.png

As for other game support, needs to be documented and abstracted prior to implementation; some documentation exists here but I don't think it's enough to get a clear idea on how PKHeX would have a SaveFile object for interaction with the main window.

Share this post


Link to post
Share on other sites
26 minutes ago, Kaphotics said:

Works fine for me.

The error means you need to have those dll's in the same folder as the exe. Rebuild the solution or just delete the output folders and try again :)

yi20dJx.png

As for other game support, needs to be documented and abstracted prior to implementation; some documentation exists here but I don't think it's enough to get a clear idea on how PKHeX would have a SaveFile object for interaction with the main window.

Hopefully we get more information in the future then.

I do have all the .dll files and the two .config files in the same folder but while PKHeX.exe works perfectly fine PKHaX.exe does not. Is there anything else I could have missed?

Share this post


Link to post
Share on other sites

Looks like it's related to some sort of hardcoded reference; the crash happens in loading the mgdb binaries:

"The located assembly's manifest definition does not match the assembly reference."
System.IO.FileLoadException occurred
  HResult=0x80131040
  Message=Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  Source=PKHeX.Core
  StackTrace:
   at PKHeX.Core.Legal.RefreshMGDB(String localDbPath) in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.Core\Legality\Core.cs:line 175
   at PKHeX.WinForms.Main.refreshMGDB() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\MainWindow\Main.cs:line 1369
   at PKHeX.WinForms.Main..ctor() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\MainWindow\Main.cs:line 149
   at PKHeX.WinForms.Program.StartPKHeX() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\Program.cs:line 80
   at PKHeX.WinForms.Program.Main() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\Program.cs:line 36

@evandixon

Share this post


Link to post
Share on other sites
8 hours ago, Kaphotics said:

Looks like it's related to some sort of hardcoded reference; the crash happens in loading the mgdb binaries:


"The located assembly's manifest definition does not match the assembly reference."

System.IO.FileLoadException occurred
  HResult=0x80131040
  Message=Could not load file or assembly 'System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
  Source=PKHeX.Core
  StackTrace:
   at PKHeX.Core.Legal.RefreshMGDB(String localDbPath) in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.Core\Legality\Core.cs:line 175
   at PKHeX.WinForms.Main.refreshMGDB() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\MainWindow\Main.cs:line 1369
   at PKHeX.WinForms.Main..ctor() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\MainWindow\Main.cs:line 149
   at PKHeX.WinForms.Program.StartPKHeX() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\Program.cs:line 80
   at PKHeX.WinForms.Program.Main() in C:\Users\Kurt\Documents\Visual Studio 2015\Projects\PKHeX\PKHeX\PKHeX.WinForms\Program.cs:line 36

@evandixon

Try stripping away everything but the Assembly Name from the project reference in the project file. (E.g. System.IO.FileSystem, Version=4.0.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL => System.IO.FileSystem.) It looks like the wrong version of IO.FileSystem is present (It's trying to load 4.0.1 with a 4.0.2 reference with the 4.3.0 package). It's possible that allowing multiple versions would cause more trouble, but I don't think you're doing anything complicated enough with it to matter.

Share this post


Link to post
Share on other sites

So yeah, I managed to find a solution of sorts. To be fair though its one of those really simple solutions that is easy to miss.

Make a copy of PKHeX.exe.config and rename the copy to PKHaX.exe.config, this will actually let PKHaX.exe boot up successfully.

I am sorry for the trouble but it did seem like a bug that needed to be fixed.

  • Like 1

Share this post


Link to post
Share on other sites

Changed the exe-filename detection to an input argument.

Make a bat file with the contents:

start pkhex hax
exit 0

, and put it in the same folder. To boot into hax mode, just double click the bat :)

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×