BindingFailure was detected

5 posts, 0 answers
  1. Pierre Alain
    Pierre Alain avatar
    20 posts
    Member since:
    Jun 2008

    Posted 03 Jun 2010 Link to this post

    We recently updated to Q1 2010 SP2.

    When I add a office2007BlackTheme to a form, the run in debug with Exceptions set up to break whenever an exception is thrown, I get the exception below on this line from InitializeComponent:

     

     

    this.office2007BlackTheme1 = new Telerik.WinControls.Themes.Office2007BlackTheme(); 

     

     

     

    Everything still seems to work fine, but it is anoying when debugging.

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

    === Pre-bind state information ===
    LOG: User = LOGICIM\pacarrier
    LOG: DisplayName = Telerik.WinControls.XmlSerializers, Version=2010.1.10.504, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL
     (Fully-specified)
    LOG: Appbase = file:///C:/Users/pacarrier/Documents/Visual Studio 2008/Projects/TestTelerik/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: Post-policy reference: Telerik.WinControls.XmlSerializers, Version=2010.1.10.504, Culture=neutral, PublicKeyToken=5bb2a467cbec794e, processorArchitecture=MSIL
    LOG: Attempting download of new URL file:///C:/Users/pacarrier/Documents/Visual Studio 2008/Projects/TestTelerik/bin/Debug/Telerik.WinControls.XmlSerializers.DLL.
    LOG: Attempting download of new URL file:///C:/Users/pacarrier/Documents/Visual Studio 2008/Projects/TestTelerik/bin/Debug/Telerik.WinControls.XmlSerializers/Telerik.WinControls.XmlSerializers.DLL.
    LOG: Attempting download of new URL file:///C:/Users/pacarrier/Documents/Visual Studio 2008/Projects/TestTelerik/bin/Debug/Telerik.WinControls.XmlSerializers.EXE.
    LOG: Attempting download of new URL file:///C:/Users/pacarrier/Documents/Visual Studio 2008/Projects/TestTelerik/bin/Debug/Telerik.WinControls.XmlSerializers/Telerik.WinControls.XmlSerializers.EXE.

     

  2. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 08 Jun 2010 Link to this post

    Hi pacarrier,

    The issue that you experience seems to be related to an assembly mismatch. Please make sure that you have followed all the steps described in this article concerning the upgrade process.

    If you have additional questions, feel free to contact me.

    Best wishes,
    Nikolay
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Pierre Alain
    Pierre Alain avatar
    20 posts
    Member since:
    Jun 2008

    Posted 08 Jun 2010 Link to this post

    Thank you for your reply.

    I updated using the Project Upgrade Utility.

    Please note that if I create a new project from scratch, I get the same result.

    The reference seems to be correct: C:\Program Files\Telerik\RadControls for WinForms Q1 2010 SP2\bin\Telerik.WinControls.Themes.Office2007Black.dll. Version is 2010.1.10.504. From the debug console, I can see that assembly loading fine.

    I can't find Telerik.WinControls.XmlSerializers anywhere. Where is it supposed to be?

     

  5. Pierre Alain
    Pierre Alain avatar
    20 posts
    Member since:
    Jun 2008

    Posted 10 Jun 2010 Link to this post

    Found this bug report on Microsoft Connect: https://connect.microsoft.com/VisualStudio/feedback/details/304095/bindingfailure-mda-when-using-xmlserializer

    The solution would be to use sgen for whatever xmlserialiable type is used in that assembly.

    For now, I'll turn off Exceptions...
  6. Victor
    Admin
    Victor avatar
    1351 posts

    Posted 14 Jun 2010 Link to this post

    Hello pacarrier,

    Thank you for writing and for the research you have done.

    Indeed, this is just how the xml serializer works. There are other instances of similar behavior. For example if CurrencyManager calls a part of your code and you throw a particular exception it will catch it and the debugger will stop if you have enabled the .NET Framework source stepping. This can be a huge pain when your have many controls bound to the same data source but this is how it works.
    Also, the approach with exception handling is not necessarily wrong. After all, the exceptions were created in order to avoid if statements and functions returning error codes. An exception being thrown also does not always mean an error.

    This particular exception can be really annoying when debugging serialization of hundreds objects, but this is how Microsoft decided to implement it.

    Please write again if you have other questions or if you need assistance with our controls.

    Greetings,
    Victor
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top
UI for WinForms is Visual Studio 2017 Ready