{"record":{"id":"aa680be91ed955c9","repo":"lucasg/Dependencies","slug":"we-could-not-find-0-s-file-on-the-disk-anymore","errorCode":null,"errorMessage":"We could not find {0:s} file on the disk anymore, please fix this problem and refresh the window via F5","messagePattern":"We could not find (.+?) file on the disk anymore, please fix this problem and refresh the window via F5","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"DependenciesGui/DependencyWindow.xaml.cs","lineNumber":1183,"sourceCode":"            if (this.DllTreeView.SelectedItem == null)\n            {\n                UpdateImportExportLists(null, null);\n                return;\n            }\n\t\t\t\n\t\t\tDependencyNodeContext childTreeContext = ((DependencyNodeContext)(this.DllTreeView.SelectedItem as ModuleTreeViewItem).DataContext);\n            DisplayModuleInfo SelectedModule = childTreeContext.ModuleInfo.Target as DisplayModuleInfo;\n            if (SelectedModule == null)\n            {\n                return;\n            }\n\n            // Selected Pe has not been found on disk : unvalidate current module\n            SelectedModule.HasErrors = !NativeFile.Exists(SelectedModule.Filepath);\n            if (SelectedModule.HasErrors)\n            {\n                // TODO : do a proper refresh instead of asking the user to do it\n                System.Windows.MessageBox.Show(String.Format(\"We could not find {0:s} file on the disk anymore, please fix this problem and refresh the window via F5\", SelectedModule.Filepath));\n            }\n\n            // Root Item : no parent\n            ModuleTreeViewItem TreeRootItem = this.DllTreeView.Items[0] as ModuleTreeViewItem;\n\t\t\tModuleTreeViewItem SelectedItem = this.DllTreeView.SelectedItem as ModuleTreeViewItem;\n\t\t\tif (SelectedItem == TreeRootItem)\n\t\t\t{\n                // Selected Pe has not been found on disk : unvalidate current module\n                if (SelectedModule.HasErrors)\n                {\n                    UpdateImportExportLists(null, null);\n                }\n                else\n                {\n                    SelectedModule.HasErrors = false;\n                    UpdateImportExportLists(SelectedModule, null);\n                }\n    ","sourceCodeStart":1165,"sourceCodeEnd":1201,"githubUrl":"https://github.com/lucasg/Dependencies/blob/1997a40000b77bd3326cbc33672a7b9f78bb23f3/DependenciesGui/DependencyWindow.xaml.cs#L1165-L1201","documentation":"Shown by OnTreeViewSelectedItemChanged (DependenciesGui/DependencyWindow.xaml.cs:1183) when a tree node is selected but NativeFile.Exists(SelectedModule.Filepath) is false - i.e. a module that was present when the tree was built has since been removed/moved. SelectedModule.HasErrors is set true, a MessageBox asks the user to fix the problem and press F5 to refresh, and import/export lists are cleared for root selections.","triggerScenarios":"Selecting a dependency node whose backing file was deleted, renamed, or unmounted between tree construction and the click (e.g. an installer finished and removed temp DLLs, or an AV quarantined the file).","commonSituations":"Long-lived analysis sessions where files churn; analysing installers that clean up after themselves; removable-media or network paths that disconnected.","solutions":["Restore the missing file to its original path, then press F5 to rebuild the tree.","If the path is permanently gone, re-run the analysis against a complete file set.","Re-add custom search folders (Options->Properties) so resolution can relocate moved modules on refresh."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Re-validate existence before trusting a cached/stale module path.\nSelectedModule.HasErrors = !NativeFile.Exists(SelectedModule.Filepath);\nif (SelectedModule.HasErrors)\n{\n    MessageBox.Show($\"We could not find {SelectedModule.Filepath} on the disk anymore, please fix this problem and refresh via F5\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Re-run NativeFile.Exists on selection rather than trusting the path captured at tree-build time.","Trigger a rebuild (F5) after restoring files so the stale HasErrors flag clears."],"tags":["gui","stale-file","refresh","file-not-found"],"backgroundTag":null,"analyzedSha":"1997a40000b77bd3326cbc33672a7b9f78bb23f3","analyzedAt":"2026-08-13T18:14:41.696Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}