Pathoschild / SMAPI

The modding API for Stardew Valley.
https://smapi.io/
GNU Lesser General Public License v3.0
1.81k stars 258 forks source link

Game failed to start: System.IO.DirectoryNotFoundException #141

Closed jhdxr closed 7 years ago

jhdxr commented 7 years ago

I have my game installed at D:\games\Steam\steamapps\common\Stardew Valley, and everything works fine before. but since sdv upgrade to v1.11, I can't start the game any more. I have tried reinstall the game and smapi, and removed all the mods, but still no luck.

here is the log:

[12:40:07.220 AM] SDV Version: 1.11 [12:40:07.220 AM] SMAPI Version: 0.40.0 1.1-3 [12:40:07.220 AM] Validating api paths... [12:40:07.237 AM] Initializing SDV Assembly... [12:40:07.239 AM] Injecting New SDV Version... [12:40:07.239 AM] Starting SDV... [12:40:07.355 AM] Patching SDV Graphics Profile... [12:40:07.358 AM] LOADING MODS [12:40:07.359 AM] LOADED 0 MODS [12:40:07.360 AM] SDV Loaded Into Memory [12:40:07.360 AM] Initializing Console Input Thread... [12:40:07.362 AM] Registered command: help [12:40:07.365 AM] Applying Final SDV Tweaks... [12:40:07.486 AM] XNA Initialize [12:40:07.490 AM] XNA LoadContent [12:40:07.800 AM] Initializing Debug Assets... [12:40:07.818 AM] Game failed to start: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Steam\SteamApps\common\Stardew Valley\Content\XACT\FarmerSounds.xgs'. at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at Microsoft.Xna.Framework.Audio.AudioEngine..ctor(String settingsFile, TimeSpan lookAheadTime, String rendererId) at StardewValley.Game1.Initialize() at StardewModdingAPI.Inheritance.SGame.Initialize() at Microsoft.Xna.Framework.Game.RunGame(Boolean useBlockingRun) at StardewModdingAPI.Program.RunGame()

L3v1a7h4N commented 7 years ago

Same problem here. Maybe a bug in sdv?

Pathoschild commented 7 years ago

Hi @jhdxr and @L3v1a7h4N. The error message specifies which path is missing:

Game failed to start: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Program Files\Steam\SteamApps\common\Stardew Valley\Content\XACT\FarmerSounds.xgs'.

Try to navigate to that path in your file explorer. Does it exist? If not, at which segment does the path break? (For example, does C:\Program Files\Steam exist?)

L3v1a7h4N commented 7 years ago

The files are not stored on drive C, they are on D. SDV searches for the 3 Sound xgs-files on drive C ignoring the execution path. I've tried to copy the files to C:\Program Files\Steam\SteamApps\common\Stardew Valley\Content\XACT\ and the Error message disappeared but SDV crashed to desktop.

Pathoschild commented 7 years ago

@L3v1a7h4N So you installed Stardew Valley on D:\, but it's still looking for files on C:\? Did you install the game directly on D:\, or move it there after installation?

L3v1a7h4N commented 7 years ago

Installed on D:\Spiele\Steam\steamapps\common\Stardew Valley via Steam.

Pathoschild commented 7 years ago

That looks like an issue with Stardew Valley itself, not SMAPI. Try verifying the game cache or reinstalling the game. If that doesn't work, you can ask for help in the official support forums. :)