JosefNemec/Playnite · error · FileNotFoundException

Theme changelog not found.

Error message

Theme changelog not found.

What it means

Thrown by Themes.GetThemeChangelog when the changelogDir passed in does not exist on disk. It is a DirectoryNotFoundException surfaced as FileNotFoundException with the literal message 'Theme changelog not found.' The parameterless overload forwards Paths.ChangeLogsDir (= <ProgramPath>/Templates/Themes/Changelog), so missing that shipped folder is the usual cause.

Source

Thrown at source/Tools/Playnite.Toolbox/Themes.cs:60

        };

        public static List<string> PackageFileBlackListRegex { get; } = new List<string>
        {
            @"\.sln$",
            @"\.csproj$",
            @"\.csproj\.user$",
            @"^Fonts\\",
            @"^\.vs\\",
            @"^bin\\",
            @"^obj\\",
            @"^backup_"
        };

        public static List<FileChange> GetThemeChangelog(Version baseVersion, ApplicationMode mode, string changelogDir)
        {
            if (!Directory.Exists(changelogDir))
            {
                throw new FileNotFoundException("Theme changelog not found.");
            }

            var changes = new List<FileChange>();
            foreach (var changeFile in Directory.GetFiles(changelogDir, "*.txt").OrderBy(a => a))
            {
                var match = Regex.Match(Path.GetFileName(changeFile), @"(.+)-(.+)\.txt");
                if (!match.Success)
                {
                    continue;
                }

                var oldVersion = new Version(match.Groups[1].Value);
                var newVersion = new Version(match.Groups[2].Value);
                if (oldVersion < baseVersion)
                {
                    continue;
                }

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Confirm the changelog folder exists: check <ToolboxProgramPath>/Templates/Themes/Changelog and that it contains *.txt files named like <ver>-<ver>.txt.
  2. If calling the 3-arg overload, pass an absolute path you have verified with Directory.Exists first.
  3. Reinstall or re-copy the Toolbox distribution so its Templates content ships alongside the executable.
  4. Verify PlaynitePaths.ProgramPath resolves where you expect (it drives Paths.ChangeLogsDir).

Example fix

// before
var changes = Themes.GetThemeChangelog(baseVer, mode, @".\changelogs"); // may not exist

// after
var dir = Paths.ChangeLogsDir;
if (!Directory.Exists(dir))
    throw new DirectoryNotFoundException($"Changelog dir missing: {dir}");
var changes = Themes.GetThemeChangelog(baseVer, mode, dir);
Defensive patterns

Strategy: validation

Validate before calling

var dir = changelogDir ?? Paths.ChangeLogsDir;
if (!Directory.Exists(dir))
    throw new DirectoryNotFoundException($"Theme changelog directory not found: {dir}");

Prevention

When it happens

Trigger: Calling GetThemeChangelog(baseVersion, mode) (no dir arg) when the Toolbox install is missing Templates/Themes/Changelog; or calling the 3-arg overload with a custom changelogDir path that does not exist.

Common situations: Running Toolbox from a build output directory without copying the Templates tree; partial/extract-only install; a portable build where ProgramPath resolves to a folder that lacks the changelog template data; CI that publishes the binary without content files.

Related errors


AI-assisted analysis of JosefNemec/Playnite@5911f4e964 (2026-08-13). Data as JSON: /api/errors/6babe3464fe2f309. Report an issue: GitHub.