{"record":{"id":"23e78b342baba72f","repo":"stride3d/stride","slug":"build-manifest-rootmanifestfile-must-exist","errorCode":null,"errorMessage":"Build manifest [{rootManifestFile}] must exist","messagePattern":"Build manifest \\[(.+?)\\] must exist","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"sources/assets/Stride.Core.Assets/PackageSession.BuildManifest.cs","lineNumber":33,"sourceCode":"using Stride.Core.Yaml;\n\nnamespace Stride.Core.Assets;\n\npartial class PackageSession\n{\n    /// <summary>\n    /// Loads a session from a build manifest (.sdbuild) chain. Each manifest contributes its authored\n    /// package (folders/metadata), the exact assemblies to load\n    /// (<see cref=\"AssetBuildManifest.AssetAssemblies\"/>) and its project assets.\n    /// </summary>\n    public static void LoadFromBuildManifest(string rootManifestFile, PackageSessionResult sessionResult, PackageLoadParameters? loadParameters = null)\n    {\n        ArgumentNullException.ThrowIfNull(rootManifestFile);\n        ArgumentNullException.ThrowIfNull(sessionResult);\n\n        loadParameters ??= PackageLoadParameters.Default();\n        rootManifestFile = FileUtility.GetAbsolutePath(rootManifestFile);\n        if (!File.Exists(rootManifestFile)) throw new ArgumentException($\"Build manifest [{rootManifestFile}] must exist\", nameof(rootManifestFile));\n\n        try\n        {\n            AssetReferenceAnalysis.EnableCaching = true;\n            sessionResult.Clear();\n            sessionResult.Progress(\"Loading..\", 0, 1);\n\n            var session = new PackageSession();\n\n            // Chase the manifest chain (referenced project manifests), keyed by absolute path\n            var manifests = new Dictionary<string, AssetBuildManifest>(StringComparer.OrdinalIgnoreCase);\n            var queue = new Queue<string>();\n            queue.Enqueue(rootManifestFile);\n            while (queue.Count > 0)\n            {\n                var file = queue.Dequeue();\n                if (manifests.ContainsKey(file))\n                    continue;","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/stride3d/stride/blob/96fad776d210c221682aac1ccdf4c79dc046fc38/sources/assets/Stride.Core.Assets/PackageSession.BuildManifest.cs#L15-L51","documentation":"PackageSessionHelper.LoadFromBuildManifest loads a session from a previously saved build manifest file. It throws ArgumentException when the supplied rootManifestFile path does not exist on disk, failing fast before attempting to parse a missing file.","triggerScenarios":"Calling LoadFromBuildManifest(rootManifestFile, sessionResult, loadParameters) with a path where no build manifest file exists (File.Exists returns false).","commonSituations":"Manifest not yet generated (build never ran), typo in the manifest path, manifest deleted by a clean, running from a different working directory with a relative path resolving elsewhere.","solutions":["Check File.Exists(rootManifestFile) before calling and produce a friendly message","Run the build/packaging step that generates the manifest first","Pass an absolute path (the code calls FileUtility.GetAbsolutePath, but verify base directory)","Verify the relative path resolves from the expected working directory"],"exampleFix":"// before\nPackageSessionHelper.LoadFromBuildManifest(\"build/manifest.xml\", sessionResult);\n// after\nvar manifest = Path.GetFullPath(\"build/manifest.xml\");\nif (!File.Exists(manifest)) throw new FileNotFoundException(\"Run a build first to generate the manifest\", manifest);\nPackageSessionHelper.LoadFromBuildManifest(manifest, sessionResult);","handlingStrategy":"validation","validationCode":"var abs = FileUtility.GetAbsolutePath(rootManifestFile);\nif (!File.Exists(abs)) throw new FileNotFoundException($\"Build manifest missing (run a build first): {abs}\", abs);","typeGuard":null,"tryCatchPattern":"try { PackageSessionHelper.LoadFromBuildManifest(manifest, sessionResult); }\ncatch (ArgumentException ex) { logger.Error(ex, \"Build manifest missing or invalid\"); }","preventionTips":["Run the manifest-generating build before loading sessions","Use absolute, rooted paths for manifests","Check manifest existence at startup with a clear error message"],"tags":["file","io","assets"],"backgroundTag":"file-not-found","analyzedSha":"96fad776d210c221682aac1ccdf4c79dc046fc38","analyzedAt":"2026-09-14T02:59:31.279Z","contentChangedAt":"2026-09-14T02:59:31.279Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}