Hello again!
Recently we upgraded to MS 10 Desktop and we are currently using the latest stable builds for all TG components. But now when I try to use GeoSerializer to serialize the MapPrinterLayer I get the following exception:
System.ArgumentException was unhandled
HResult=-2147024809
Message=Invalid name character in '7hU='. The '7' character, hexadecimal value 0x37, cannot be included in a name.
Source=System.Xml
StackTrace:
at System.Xml.XmlWellFormedWriter.CheckNCName(String ncname)
at System.Xml.XmlWellFormedWriter.WriteStartElement(String prefix, String localName, String ns)
at ThinkGeo.MapSuite.Serialize.XmlGeoSerializationFormatter.eSQ=(GeoObjectNode node, XmlWriter xmlWriter)
at ThinkGeo.MapSuite.Serialize.XmlGeoSerializationFormatter.eSQ=(GeoObjectNode node, XmlWriter xmlWriter)
at ThinkGeo.MapSuite.Serialize.XmlGeoSerializationFormatter.eSQ=(GeoObjectNode node, XmlWriter xmlWriter)
at ThinkGeo.MapSuite.Serialize.XmlGeoSerializationFormatter.SaveCore(GeoObjectModel model, Stream stream)
at ThinkGeo.MapSuite.Serialize.GeoSerializer.Serialize(Object objectToSerialize, String targetPathFilename)
at Serialization_Bug.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\ZipPa\Documents\Visual Studio 2015\Projects\Serialization Bug\Form1.vb:line 30
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.Form.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
InnerException:
In putting together a sample I could not reproduce the problem until I got a private property, mapImageCache, to populate on the MapPrinterLayer. It appears that this is the property that causes the issue. Please have a look and see if there is some workaround.
Serialization Bug.zip (51.9 KB)
Thanks!
Steve