{"record":{"id":"696e5f41a3c2def5","repo":"dotnet/wpf","slug":"sr-reachserialization-noserializer-reachfixedpageserializer","errorCode":null,"errorMessage":"SR.ReachSerialization_NoSerializer","messagePattern":"SR\\.ReachSerialization_NoSerializer","errorType":"exception","errorClass":"XpsSerializationException","httpStatus":null,"severity":"error","filePath":"src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs","lineNumber":400,"sourceCode":"        #region Private Methods\n\n        private\n        bool\n        SerializePageAsVisual(\n            Visual fixedPageAsVisual\n            )\n        {\n            bool needEndVisual = false;\n\n            ReachVisualSerializer serializer = new ReachVisualSerializer(SerializationManager);\n\n            if(serializer!=null)\n            {\n                needEndVisual = serializer.SerializeDisguisedVisual(fixedPageAsVisual);\n            }\n            else\n            {\n                throw new XpsSerializationException(SR.ReachSerialization_NoSerializer);\n            }\n\n            return needEndVisual;\n        }\n\n        #endregion Private Methods\n    };\n}\n","sourceCodeStart":382,"sourceCodeEnd":409,"githubUrl":"https://github.com/dotnet/wpf/blob/81131a70a4c573cd62748a5c36908fc4d662daa9/src/Microsoft.DotNet.Wpf/src/ReachFramework/Serialization/manager/ReachFixedPageSerializer.cs#L382-L409","documentation":"ReachFixedPageSerializer.SerializePageAsVisual throws XpsSerializationException (ReachSerialization_NoSerializer) when it asks the serialization manager for a serializer to render the FixedPage as a disguised visual and none is returned. This path is used when a page is serialized as a visual rather than as markup, so a missing serializer means the visual cannot be emitted.","triggerScenarios":"PersistObjectData takes the 'serialize page as visual' branch; the manager's serializer lookup for the visual/page returns null (type unregistered or serializer factory missing).","commonSituations":"Custom visual types in the page without registered serializers; policy/manager misconfiguration where AcquireXmlWriterForPage/serializer pipeline is set up incompletely.","solutions":["Ensure the page/visual type has a registered serializer in the XpsSerializationManager","Use standard FixedPage/visual types so the built-in serializer resolves","Catch XpsSerializationException around the write and log the visual's type"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// Verify the visual type is a built-in serialized type before writing\nbool supported = page is System.Windows.Documents.FixedPage;","typeGuard":"static bool IsFixedPage(object o) => o is System.Windows.Documents.FixedPage;","tryCatchPattern":"try { writer.Write(page); } catch (System.Windows.Xps.XpsSerializationException ex) { log.Error(\"No serializer for page visual: \" + page.GetType(), ex); throw; }","preventionTips":["Prefer standard FixedPage visuals","Register serializers for custom visuals","Verify packaging policy is fully configured before writing"],"tags":["xps","wpf","serialization","dotnet"],"backgroundTag":"missing-dependency","analyzedSha":"81131a70a4c573cd62748a5c36908fc4d662daa9","analyzedAt":"2026-09-14T10:12:48.479Z","contentChangedAt":"2026-09-14T10:12:48.479Z","schemaVersion":2},"datasetVersion":"2026-09-22T01:17:13.364Z"}