Hello,
Attached please find a zip file that has a simple TChart .NET project. After unzipping the file load the project in VS 2017. Please select Debug -> Windows -> Exceptions settings and enable the check box next to the 'Managed Debugging Assistant'.
If you run the program you should see the exception dialog box that says 'Managed Debugging Assistant BindingFailure: ' and a long message which is saying failure to load XMlserializer.
I am trying to get rid of this exception. This happens only first time and program works. However it increases the load time of the form for the first time.
Please let me know how to resolve this.
Thanks
C# XmlSerializer BindingFailure
C# XmlSerializer BindingFailure
- Attachments
-
- TChartDisplay5.zip
- Project zip file
- (13.73 KiB) Downloaded 847 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: C# XmlSerializer BindingFailure
Hello,
Which version of TeeChart.dll are you using? I don't get anything using either of the last two publicly released versions.
Which version of TeeChart.dll are you using? I don't get anything using either of the last two publicly released versions.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: C# XmlSerializer BindingFailure
We are using 4.1.2017.10194 version - .Net 4.5.1. Please enable the exception settings for 'Managed Debugging Assistant' .
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: C# XmlSerializer BindingFailure
Hello -
I think you might be getting this error (from here):sanjay wrote:We are using 4.1.2017.10194 version - .Net 4.5.1. Please enable the exception settings for 'Managed Debugging Assistant' .
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: C# XmlSerializer BindingFailure
The exception will also happen at tun time and will slow down the startup time for the windows forms application.
Please look at the second answer to the above post from stack overflow (copied below)
------------------------------------------------------------
Use the following method to construct your xmlSerializer instance will fix the problem:
XmlSerializer s = XmlSerializer.FromTypes(new[] { typeof(CustomXMLSerializeObject) })[0];
then, you don't need to turn off the exception handlings.
---------------------------------------------------------
TChart constructor needs to put above code so that exception does not happen.
The exception slows down the startup of my forms and the above posts mentions that you can generate a XML serializer assembly for TChart DLL that can be distributed. That can also prevent exception.
Please show the post from stack overflow to your developer and see if you can fix the exception and/or generate the serializer assembly.
Please look at the second answer to the above post from stack overflow (copied below)
------------------------------------------------------------
Use the following method to construct your xmlSerializer instance will fix the problem:
XmlSerializer s = XmlSerializer.FromTypes(new[] { typeof(CustomXMLSerializeObject) })[0];
then, you don't need to turn off the exception handlings.
---------------------------------------------------------
TChart constructor needs to put above code so that exception does not happen.
The exception slows down the startup of my forms and the above posts mentions that you can generate a XML serializer assembly for TChart DLL that can be distributed. That can also prevent exception.
Please show the post from stack overflow to your developer and see if you can fix the exception and/or generate the serializer assembly.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: C# XmlSerializer BindingFailure
Hello,
setting false in the TChart constructor, e.g.
new TChart(false);
and commenting out the call to:
//this.tChart1.CurrentTheme = Steema.TeeChart.ThemeType.Report;
will stop this issue from occuring.
setting false in the TChart constructor, e.g.
new TChart(false);
and commenting out the call to:
//this.tChart1.CurrentTheme = Steema.TeeChart.ThemeType.Report;
will stop this issue from occuring.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: C# XmlSerializer BindingFailure
Thank you. That fixed it. I really appreciate your help. Thanks again.
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: C# XmlSerializer BindingFailure
You're very welcome, and your thanks are appreciated.sanjay wrote:Thank you. That fixed it. I really appreciate your help. Thanks again.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |