beeradmoore/dlss-swapper · error · Exception
GamePage_CouldNotFindGameInstallPathTemplate
Error message
GamePage_CouldNotFindGameInstallPathTemplate
What it means
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.
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.
Example fix
// before: stale asset path
model.OpenDLLPath(); // throws
// after: refresh before opening
if (!Directory.Exists(Path.GetDirectoryName(gameAsset.Path)))
await RefreshGameAssetPathAsync(gameAsset);
else
model.OpenDLLPath(); Defensive patterns
Strategy: validation
Validate before calling
var dir = Path.GetDirectoryName(gameAsset.Path);
if (!Directory.Exists(dir))
throw new DirectoryNotFoundException($"DLL folder not found: {dir}"); Type guard
static bool AssetPathExists(GameAsset a) => !string.IsNullOrWhiteSpace(a.Path) && Directory.Exists(Path.GetDirectoryName(a.Path));
Try / catch
try { multiDllDialog.OpenDLLPath(); }
catch (Exception ex) when (ex.Message.Contains("CouldNotFindGameInstallPath"))
{ Logger.Error(ex); MarkAssetStale(gameAsset); } Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- GamePage_DllPicker_CouldNotFindFileTemplate
- GamePage_CouldNotFindGameInstallPathTemplate
- Failed to load DLL
- Failed to get function address
- Failed to get function delegate
AI-assisted analysis of beeradmoore/dlss-swapper@ab9b1e2d4b (2026-09-15).
Data as JSON: /api/errors/322b20b732f84460.
Report an issue: GitHub.
Appendix: source
Thrown at src/UserControls/MultipleDLLsFoundControlModel.cs:42
[RelayCommand]
void OpenDLLPath(GameAsset gameAsset)
{
try
{
if (File.Exists(gameAsset.Path))
{
Process.Start("explorer.exe", $"/select,{gameAsset.Path}");
}
else
{
var dllPath = Path.GetDirectoryName(gameAsset.Path) ?? string.Empty;
if (Directory.Exists(dllPath))
{
Process.Start("explorer.exe", dllPath);
}
else
{
throw new Exception(ResourceHelper.GetFormattedResourceTemplate("GamePage_CouldNotFindGameInstallPathTemplate", gameAsset.Path));
}
}
}
catch (Exception err)
{
Logger.Error(err);
}
}
}
View on GitHub (pinned to ab9b1e2d4b)