{"record":{"id":"7f2994e28a272945","repo":"dotnet/wpf","slug":"reachpackaging-notafixeddocumentsequence","errorCode":null,"errorMessage":"ReachPackaging_NotAFixedDocumentSequence","messagePattern":"ReachPackaging_NotAFixedDocumentSequence","errorType":"exception","errorClass":"XpsPackagingException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs","lineNumber":625,"sourceCode":"            ParserContext parserContext = new ParserContext\n            {\n                BaseUri = PackUriHelper.Create(Uri, CurrentXpsManager.StartingPart.Uri)\n            };\n\n            Uri packageUri = PackUriHelper.GetPackageUri(parserContext.BaseUri);\n\n            Uri previousPackageUri = XpsLoadingContext.ActivePackageUri;\n            \n            // Establish XPS package context so that ambient-check sinks\n            // (BitmapImage, BitmapDecoder, ColorContext, FontSource, PixelShader)\n            // see the correct package origin during .fdseq parsing.\n            XpsLoadingContext.ActivePackageUri = packageUri;\n            try\n            {\n                object fixedObject = XamlReader.Load(CurrentXpsManager.StartingPart.GetStream(), parserContext, useRestrictiveXamlReader: true);\n                if (!(fixedObject is FixedDocumentSequence))\n                {\n                     throw new XpsPackagingException(SR.ReachPackaging_NotAFixedDocumentSequence);\n                }\n\n                return fixedObject as FixedDocumentSequence;\n            }\n            finally\n            {\n                XpsLoadingContext.ActivePackageUri = previousPackageUri;\n            }\n        }\n\n        /// <summary>\n        /// This method commits the changes of the package and closes it.\n        /// Further changes after a commit will cause an exception to be\n        /// thrown.\n        /// </summary>\n        internal\n        override\n        void","sourceCodeStart":607,"sourceCodeEnd":643,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs#L607-L643","documentation":"GetFixedDocumentSequence throws this XpsPackagingException when the part referenced as the root does not correspond to a FixedDocumentSequence — the starting part's content/URI resolves to something other than an .fdseq root, so a FixedDocumentSequence cannot be produced from it.","triggerScenarios":"Thrown at src/Microsoft.DotNet.Wpf/src/ReachFramework/Packaging/XpsDocument.cs:625 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the package's starting part has the FixedDocumentSequence content type (.fdseq) before calling GetFixedDocumentSequence","Call the appropriate reader method (GetFixedDocument / page APIs) for packages whose root is not a FixedDocumentSequence","Catch XpsPackagingException and inspect the starting part content type to route to the right reader"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-21T21:30:21.729Z"}