Issue Stardew Valley SMAPI

Deku_Scrub

Greenhorn
Good evening!
I have been playing Stardew with mods for awhile now via Vortex and have never had an issue before. Suddenly I tried running the game and I receive this error message:

Oops! SMAPI couldn't load the game executable. The technical details below may have more info.

Technical details: System.BadImageFormatException: Could not load file or assembly 'Stardew Valley' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Stardew Valley'
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
at System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
at System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
at System.Type.GetType(String typeName, Boolean throwOnError)
at StardewModdingAPI.Program.AssertGamePresent() in C:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:line 80

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].


Game has ended. Press any key to exit.

I've read a few things to try here and there, but I would rather have someone explain it to me before I try anything and mess it up more! I haven't changed any settings or anything since my last play a few days ago, so I'm not sure what happened or if I played without the binding logging enabled or not before. Or if this error would even be involved with the warning at the bottom. Honestly very confused how it cannot load the game itself, so if anyone could please help!
 

Rengeki

Newcomer
I have a similar error message, but I think the difference could be caused because I'm a german player and accordingly play in German...here is my version (I make two versions in one post, one without changing anything and one with translating the german parts into english)
SMAPI failed to initialize: System.BadImageFormatException:
Could not load file or assembly 'Stardew Valley' or one of its dependencies. An attempt was made to load a program with an incorrect format.
File name: 'Stardew Valley'
bei System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
bei System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
bei System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
bei System.Type.GetType(String typeName, Boolean throwOnError)
bei StardewModdingAPI.Program.AssertGamePresent() in C:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:Zeile 87.
bei StardewModdingAPI.Program.Main(String[] args) in C:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:Zeile 40.

WRN: Assembly binding logging is turned OFF.
To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
Note: There is some performance penalty associated with assembly bind failure logging.
To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].

Game has ended. Press any key to exit.
SMAPI failed to initialize: System.BadImageFormatException: Die Datei oder Assembly "Stardew Valley" oder eine Abhängigkeit davon wurde nicht gefunden. Es wurde versucht, eine Datei mit einem falschen Format zu laden.
Dateiname: "Stardew Valley"
bei System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMarkHandle stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName, ObjectHandleOnStack type)
bei System.RuntimeTypeHandle.GetTypeByName(String name, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark, IntPtr pPrivHostBinder, Boolean loadTypeFromPartialName)
bei System.RuntimeType.GetType(String typeName, Boolean throwOnError, Boolean ignoreCase, Boolean reflectionOnly, StackCrawlMark& stackMark)
bei System.Type.GetType(String typeName, Boolean throwOnError)
bei StardewModdingAPI.Program.AssertGamePresent() in C:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:Zeile 87.
bei StardewModdingAPI.Program.Main(String[] args) in C:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:Zeile 40.

WRN: Protokollierung der Assemblybindung ist AUS.
Sie können die Protokollierung der Assemblybindungsfehler aktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) auf 1 festlegen.
Hinweis: Die Protokollierung der Assemblybindungsfehler führt zu einer gewissen Leistungseinbuße.
Sie können dieses Feature deaktivieren, indem Sie den Registrierungswert [HKLM\Software\Microsoft\Fusion!EnableLog] entfernen.

Game has ended. Press any key to exit.
 

Deku_Scrub

Greenhorn
Apparently there was an update for Stardew Valley and SMAPI that I think confused the computer files somewhere along the way. So what I did to fix it was completely uninstalling SMAPI, making sure stardew valley properly updated on my computer (Since I have it through steam) and then reinstalling SMAPI again through nexusmods, making sure it was the updated version. I followed the installer and it had me download .NET 5.o runtime otherwise it said it couldn't run it properly. (Here's the link: https://dotnet.microsoft.com/download/dotnet/5.0/runtime) I don't know if your SMAPI installer will tell you the same thing, but I think that's what needed to be installed to make my game work for me. Hope this helps!!
 

Rengeki

Newcomer
Apparently there was an update for Stardew Valley and SMAPI that I think confused the computer files somewhere along the way. So what I did to fix it was completely uninstalling SMAPI, making sure stardew valley properly updated on my computer (Since I have it through steam) and then reinstalling SMAPI again through nexusmods, making sure it was the updated version. I followed the installer and it had me download .NET 5.o runtime otherwise it said it couldn't run it properly. (Here's the link: https://dotnet.microsoft.com/download/dotnet/5.0/runtime) I don't know if your SMAPI installer will tell you the same thing, but I think that's what needed to be installed to make my game work for me. Hope this helps!!
It's starting again, thank you very much...well, now the mods aren't loaded but I think about it myself.
 
Top