Issue SMAPI failure

Starligh

Newcomer
I tried to update SMAPI and some mods. I backed up the original files before I updated the program and mods. When I ran STV after updating SMAPI, it gave me an exception error and quickly closed.

"Unhandled exception. System.TypeLoadException: Could not load type 'System.BadImageFormatException' from assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at StardewModdingAPI.Program.Main(String[] args)"

I uninstalled the update and copied the older files back into the main STV folder. I still can't get into the program, getting a different error.

"Error resolving assembly: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\smapi-internal'.
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1.Init()
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at StardewModdingAPI.Program.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs e) in E:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:line 63
SMAPI failed to initialize: System.IO.FileNotFoundException: Could not load file or assembly 'SMAPI.Toolkit.CoreInterfaces, Version=3.13.2.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'SMAPI.Toolkit.CoreInterfaces, Version=3.13.2.0, Culture=neutral, PublicKeyToken=null'
at StardewModdingAPI.Program.AssertGameVersion()
at StardewModdingAPI.Program.Main(String[] args) in E:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:line 35
Game has ended. Press any key to exit."

When I click on the StardewValley.exe file, the vanilla program will work fine with older saves, but crashes if I try to open a recent (modded) save.

How do I fix this so I can play the modded versions again? (Preferably with the updated mods, but I'll take the ones I started with).

Thanks.
 

UlyanaLeyana

Planter
I tried to update SMAPI and some mods. I backed up the original files before I updated the program and mods. When I ran STV after updating SMAPI, it gave me an exception error and quickly closed.

"Unhandled exception. System.TypeLoadException: Could not load type 'System.BadImageFormatException' from assembly 'System.Runtime, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
at StardewModdingAPI.Program.Main(String[] args)"

I uninstalled the update and copied the older files back into the main STV folder. I still can't get into the program, getting a different error.

"Error resolving assembly: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley\smapi-internal'.
at System.IO.Enumeration.FileSystemEnumerator`1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator`1.Init()
at System.IO.Enumeration.FileSystemEnumerator`1..ctor(String directory, Boolean isNormalized, EnumerationOptions options)
at System.IO.Enumeration.FileSystemEnumerable`1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.FileInfos(String directory, String expression, EnumerationOptions options, Boolean isNormalized)
at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at StardewModdingAPI.Program.CurrentDomain_AssemblyResolve(Object sender, ResolveEventArgs e) in E:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:line 63
SMAPI failed to initialize: System.IO.FileNotFoundException: Could not load file or assembly 'SMAPI.Toolkit.CoreInterfaces, Version=3.13.2.0, Culture=neutral, PublicKeyToken=null'. The system cannot find the file specified.
File name: 'SMAPI.Toolkit.CoreInterfaces, Version=3.13.2.0, Culture=neutral, PublicKeyToken=null'
at StardewModdingAPI.Program.AssertGameVersion()
at StardewModdingAPI.Program.Main(String[] args) in E:\source\_Stardew\SMAPI\src\SMAPI\Program.cs:line 35
Game has ended. Press any key to exit."

When I click on the StardewValley.exe file, the vanilla program will work fine with older saves, but crashes if I try to open a recent (modded) save.

How do I fix this so I can play the modded versions again? (Preferably with the updated mods, but I'll take the ones I started with).

Thanks.
Looks like you installed SMAPI incorrectly, can you please reinstall it again?
Install SMAPI:
 
Last edited:
Top