Adrian Leeming

I am trying to create a VSTO project for WORD that stores data in the data island. When debugging In the document ShutDown event handler I get BindingFailiure messages that it cannot load the xml Seralizer (see bottom of message for error). Does anyone have any idea what the problem is

The VSTO Document code looks like

public partial class ThisDocument

{

[Cached()]

public DealPitch DocData;

[Cached()]

public DealPitch DocData;

.....

}

[Serializable]

[System.Xml.Serialization.XmlTypeAttribute("DealPitch")]

The DealPitch class looks like this will become a more complex.

public class DealPitch

{

[XmlAttribute("DocType")]

public String DocType;

[XmlAttribute("PaperSize")]

public String PaperSize;

}

BindingFailure was detected
Message: The assembly with display name 'SmartMarketingPitch.XmlSerializers' failed to load in the 'LoadFrom' binding context of the AppDomain with ID 2. The cause of the failure was: System.IO.FileNotFoundException: Could not load file or assembly 'SmartMarketingPitch.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.
File name: 'SmartMarketingPitch.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'

=== Pre-bind state information ===
LOG: User = xxx\acl
LOG: DisplayName = SmartMarketingPitch.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null, processorArchitecture=MSIL
(Fully-specified)
LOG: Appbase =
file:///C:/ACL.Net/MDR Marketing/SmartMarketingPitch/bin/Debug/
LOG: Initial PrivatePath = NULL
Calling assembly : System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089.
===
LOG: This bind starts in default load context.
LOG: No application configuration file found.
LOG: Using machine configuration file from C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Policy not being applied to reference at this time (private, custom, partial, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/ACL.Net/MDR Marketing/SmartMarketingPitch/bin/Debug/SmartMarketingPitch.XmlSerializers.DLL.
LOG: Attempting download of new URL
file:///C:/ACL.Net/MDR Marketing/SmartMarketingPitch/bin/Debug/SmartMarketingPitch.XmlSerializers/SmartMarketingPitch.XmlSerializers.DLL.
LOG: Attempting download of new URL
file:///C:/ACL.Net/MDR Marketing/SmartMarketingPitch/bin/Debug/SmartMarketingPitch.XmlSerializers.EXE.
LOG: Attempting download of new URL
file:///C:/ACL.Net/MDR Marketing/SmartMarketingPitch/bin/Debug/SmartMarketingPitch.XmlSerializers/SmartMarketingPitch.XmlSerializers.EXE.



Re: Visual Studio Tools for Office VSTO data island serializable problem

Adrian Leeming

Okay I was getting confused, a doh moment, sorted this problem as to why there was no data going in the word document