JosefNemec/Playnite · error · Exception

Manifest file ({PlaynitePaths.ThemeManifestFileName}) not fo

Error message

Manifest file ({PlaynitePaths.ThemeManifestFileName}) not found!

What it means

Thrown by Themes.PackageTheme when themeDirectory has no theme.yaml (PlaynitePaths.ThemeManifestFileName). The method resolves manifestPath = Path.Combine(themeDirectory, "theme.yaml") and aborts before reading anything. Symmetrical to the extension manifest check; the theme packer needs the manifest for Id, Version, Mode, and ThemeApiVersion.

Source

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

            }

            if (file1Info.Extension.Equals(".xaml", StringComparison.OrdinalIgnoreCase))
            {
                return Xml.AreEqual(File.ReadAllText(file1), File.ReadAllText(file2));
            }
            else
            {
                return FileSystem.GetMD5(file1) == FileSystem.GetMD5(file2);
            }
        }

        public static string PackageTheme(string themeDirectory, string targetPath, ApplicationMode mode)
        {
            var dirInfo = new DirectoryInfo(themeDirectory);
            var manifestPath = Path.Combine(themeDirectory, PlaynitePaths.ThemeManifestFileName);
            if (!File.Exists(manifestPath))
            {
                throw new Exception($"Manifest file ({PlaynitePaths.ThemeManifestFileName}) not found!");
            }

            var extInfo = ExtensionInstaller.GetThemeManifest(manifestPath);
            if (extInfo.Id.IsNullOrEmpty())
            {
                throw new Exception("Cannot package theme, ID is missing!");
            }

            extInfo.VerifyManifest();

            var apiVer = extInfo.Mode == ApplicationMode.Desktop ? ThemeManager.DesktopApiVersion : ThemeManager.FullscreenApiVersion;
            var themeApiVer = Version.Parse(extInfo.ThemeApiVersion);
            if (themeApiVer > apiVer)
            {
                throw new Exception($"Cannot package theme. Unsupported API version detected: {themeApiVer}");
            }
            else if (themeApiVer != apiVer)
            {

View on GitHub (pinned to 5911f4e964)

Solutions

  1. Confirm theme.yaml exists directly inside themeDirectory (exact name, .yaml not .yml).
  2. Regenerate via `Toolbox new DesktopTheme`/`FullscreenTheme` to produce a valid theme.yaml scaffold.
  3. Point PackageTheme at the directory that contains theme.yaml, not a parent or sibling.
  4. Resolve themeDirectory to an absolute path before calling.

Example fix

// before
Themes.PackageTheme(@".\MyTheme\bin", out, mode);

// after
var themeDir = Path.GetFullPath(@".\MyTheme");
if (!File.Exists(Path.Combine(themeDir, PlaynitePaths.ThemeManifestFileName)))
    throw new FileNotFoundException("theme.yaml missing", themeDir);
Themes.PackageTheme(themeDir, out, mode);
Defensive patterns

Strategy: validation

Validate before calling

var manifestPath = Path.Combine(themeDirectory, PlaynitePaths.ThemeManifestFileName);
if (!File.Exists(manifestPath))
    throw new FileNotFoundException($"theme.yaml not found at {manifestPath}", manifestPath);

Prevention

When it happens

Trigger: Calling PackageTheme(themeDirectory, targetPath, mode) where themeDirectory lacks theme.yaml — e.g., pointing at a theme's source/Bin folder, or at the parent Themes directory instead of the individual theme folder.

Common situations: Theme authored by hand without theme.yaml; manifest renamed to theme.yml or theme.yaml.txt; CWD-relative themeDirectory resolving to the wrong place; updating from an older layout where the manifest had a different name.

Related errors


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