RecentDocumentManager Serialization Error

Ribbon for WPF Forum

Posted 16 years ago by Bryan Livingston
Avatar
RecentDocumentManager.Deserialize is throwing the following error. This problem just started happening with the latest release.

System.Windows.Markup.XamlParseException occurred
Message="The tag 'DocumentReferenceCollection' does not exist in XML namespace 'http://schemas.actiprosoftware.com/winfx/xaml/shared'. Line '1' Position '2'."
Source="PresentationFramework"
LineNumber=1
LinePosition=2
StackTrace:
at System.Windows.Markup.XamlParser.ThrowException(String message, Int32 lineNumber, Int32 linePosition)
at System.Windows.Markup.XamlParser.ThrowException(SRID id, String value1, String value2, Int32 lineNumber, Int32 linePosition)
at System.Windows.Markup.XamlParser.WriteUnknownTagStart(XamlUnknownTagStartNode xamlUnknownTagStartNode)
at System.Windows.Markup.XamlParser.ProcessXamlNode(XamlNode xamlNode, Boolean& cleanup, Boolean& done)
at System.Windows.Markup.XamlParser.ReadXaml(Boolean singleRecordMode)
at System.Windows.Markup.TreeBuilderXamlTranslator._Parse()
at System.Windows.Markup.XamlTreeBuilder.ParseFragment()
at System.Windows.Markup.TreeBuilder.Parse()
at System.Windows.Markup.XamlReader.XmlTreeBuildDefault(ParserContext pc, Stream stream, XamlParseMode parseMode, Boolean etwTracingEnabled)
at System.Windows.Markup.XamlReader.Load(Stream stream)
at ActiproSoftware.Windows.Serialization.XamlSerializer.LoadFromStream(Stream stream)
at ActiproSoftware.Windows.Serialization.XamlSerializer.LoadFromString(String xaml)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.Deserialize(String xml)


Here is what is getting serialised.
<DocumentReferenceCollection xmlns="http://schemas.actiprosoftware.com/winfx/xaml/shared" xmlns:s="clr-namespace:System;assembly=mscorlib">
    <DocumentReference LastOpenedDateTime="2008-04-30T00:07:39.298972-06:00" Location="vsd://8669" Name="Brookelyn's Drawing" RecentDocumentManager.Index="1">
        <DocumentReference.Tag>
            <s:Int64>8669</s:Int64>
        </DocumentReference.Tag>
    </DocumentReference>
</DocumentReferenceCollection>

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
I've tried loading it here and it comes up fine. Are you able to make a simple project that reproduces it reliably? I don't see how that exception could be happening though since as long as you are sure you are running build 3.0.0405 or later, that's when DocumentReferenceCollection was added to the Shared Library.


Actipro Software Support

Posted 16 years ago by Bryan Livingston
Avatar
I built a simple project to test it out and it worked, but then I was still having the problem in my app.

I tracked it down to a base library that I'm defining some ribbon controls in. The base library was referencing ActiproSoftware.Ribbon.WPF30 but not ActiproSoftware.Shared.WPF30. I think since this base library was higher in the build and reference chain, it got involved in the xaml namespace resolution process somehow and wasn't able to find the Shared assembly.

Adding the missing refernce to my base library fixed the problem for me.
The latest build of this product (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.