BornToBeRoot/NETworkManager · error · FileNotFoundException
could not be found!
Error message
{profileFileInfo.Path} could not be found! What it means
Load was asked to read a profile file whose FileInfo no longer points to an existing file on disk (deleted or moved after startup/enumeration). Legacy XML files that vanished are tolerated (migration path just logs and removes the entry), but for non-legacy profile files the missing file is treated as an unrecoverable state and a FileNotFoundException-style error is raised from Load, which Save also triggers when it reloads before writing.
Solutions
- Verify the profile file exists at the configured path (File.Exists) before loading or saving.
- Restore the profile file from backup or re-create it if it was deleted externally.
- Correct the profile file path in the application settings if it points to a stale location.
- Check for external processes (sync tools, antivirus, cleanup scripts) removing the file while the app runs.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at Source/NETworkManager.Profiles/ProfileManager.cs:779 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BornToBeRoot/NETworkManager@2780d65469 (2026-09-12).
Data as JSON: /api/errors/3dd740ae9a4d3299.
Report an issue: GitHub.
Appendix: source
Thrown at Source/NETworkManager.Profiles/ProfileManager.cs:779
ProfileFiles.Remove(profileFileInfo);
// Notify migration completed
ProfileMigrationCompleted();
Log.Info($"Legacy XML profile file migration completed: {profileFileInfo.Path}.");
return;
}
else
{
DeserializeFromFile(profileFileInfo.Path);
}
}
}
else
{
// Don't throw an error if it's the default file.
if (profileFileInfo.Path != GetProfilesDefaultFilePath())
throw new FileNotFoundException($"{profileFileInfo.Path} could not be found!");
}
LoadedProfileFile = profileFileInfo;
if (loadedProfileUpdated)
LoadedProfileFileChanged(LoadedProfileFile, true);
// Notify subscribers that profiles have been loaded/updated
ProfilesUpdated(false);
Log.Info("Profile file loaded successfully.");
}
/// <summary>
/// Method to save the currently loaded profiles based on the infos provided in the <see cref="ProfileFileInfo" />.
/// </summary>
public static void Save()
{View on GitHub (pinned to 2780d65469)