{"record":{"id":"322b20b732f84460","repo":"beeradmoore/dlss-swapper","slug":"gamepage-couldnotfindgameinstallpathtemplate-322b20","errorCode":null,"errorMessage":"GamePage_CouldNotFindGameInstallPathTemplate","messagePattern":"GamePage_CouldNotFindGameInstallPathTemplate","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/UserControls/MultipleDLLsFoundControlModel.cs","lineNumber":42,"sourceCode":"    [RelayCommand]\n    void OpenDLLPath(GameAsset gameAsset)\n    {\n        try\n        {\n            if (File.Exists(gameAsset.Path))\n            {\n                Process.Start(\"explorer.exe\", $\"/select,{gameAsset.Path}\");\n            }\n            else\n            {\n                var dllPath = Path.GetDirectoryName(gameAsset.Path) ?? string.Empty;\n                if (Directory.Exists(dllPath))\n                {\n                    Process.Start(\"explorer.exe\", dllPath);\n                }\n                else\n                {\n                    throw new Exception(ResourceHelper.GetFormattedResourceTemplate(\"GamePage_CouldNotFindGameInstallPathTemplate\", gameAsset.Path));\n                }\n            }\n        }\n        catch (Exception err)\n        {\n            Logger.Error(err);\n        }\n    }\n}\n","sourceCodeStart":24,"sourceCodeEnd":52,"githubUrl":"https://github.com/beeradmoore/dlss-swapper/blob/ab9b1e2d4bb04187c48fe58eeea06c2b0ea71fbb/src/UserControls/MultipleDLLsFoundControlModel.cs#L24-L52","documentation":"MultipleDLLsFoundControlModel.OpenDLLPath opens the folder of the selected DLL in Windows Explorer; when the directory derived from gameAsset.Path does not exist it throws a localized 'could not find game install path' exception formatted with the asset's path. It means the DLL recorded for the game is no longer at the stored location.","triggerScenarios":"Calling OpenDLLPath from the multiple-DLLs-found dialog when Directory.Exists(dllPath) is false for the chosen gameAsset.Path — the DLL folder was deleted, moved, or the path was persisted incorrectly.","commonSituations":"Mod folder deleted or renamed after import; game moved between library folders; path references a disconnected drive; duplicate/stale asset entries pointing at old locations.","solutions":["Confirm the DLL's folder exists; reinstall or move the mod back to the recorded path.","Re-import the DLLs so gameAsset.Path is updated to the current location.","Remove the stale asset entry and re-add the game/mod.","Check drive letters and network/cloud folder availability for the stored path."],"exampleFix":"// before: stale asset path\nmodel.OpenDLLPath(); // throws\n// after: refresh before opening\nif (!Directory.Exists(Path.GetDirectoryName(gameAsset.Path)))\n    await RefreshGameAssetPathAsync(gameAsset);\nelse\n    model.OpenDLLPath();","handlingStrategy":"validation","validationCode":"var dir = Path.GetDirectoryName(gameAsset.Path);\nif (!Directory.Exists(dir))\n    throw new DirectoryNotFoundException($\"DLL folder not found: {dir}\");","typeGuard":"static bool AssetPathExists(GameAsset a) => !string.IsNullOrWhiteSpace(a.Path) && Directory.Exists(Path.GetDirectoryName(a.Path));","tryCatchPattern":"try { multiDllDialog.OpenDLLPath(); }\ncatch (Exception ex) when (ex.Message.Contains(\"CouldNotFindGameInstallPath\"))\n{ Logger.Error(ex); MarkAssetStale(gameAsset); }","preventionTips":["Validate gameAsset.Path existence when the multiple-DLL dialog opens, not just on click.","Clean up asset entries when their files are detected as missing during scans.","Re-import mods after they are moved or updated to refresh stored paths.","Surface stale-path indicators in the library so users fix entries before opening folders."],"tags":["file-system","path","dll","not-found"],"backgroundTag":"file-not-found","analyzedSha":"ab9b1e2d4bb04187c48fe58eeea06c2b0ea71fbb","analyzedAt":"2026-09-15T05:25:32.979Z","contentChangedAt":"2026-09-15T05:25:32.979Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}