none
.Net 4.5.1 makes default serialization method as "System.Xml" RRS feed

  • Question

  • Hi All,

    I have very terrible question, which wast lots of my time. I have WCF Service which was build using .net framework 4.0 and VS 2010. It works perfectly (using "DataContractSerialiser" ) with the web application developed using vs 2010 and framework 4.0. Then last week I have Updated my .net framework from 4.0 to 4.5.1. Now I tried to update above WCF service, Unfortunately it serialize using "System.Xml". And this failed build of the web project because xml serialization completely difference to the data contract serialization. How can I fix this issue ?

    Ex:

    /// <remarks/>
        [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.18408")]
        [System.SerializableAttribute()]
        [System.Diagnostics.DebuggerStepThroughAttribute()]
        [System.ComponentModel.DesignerCategoryAttribute("code")]
        [System.Xml.Serialization.XmlTypeAttribute(Namespace="http://schemas.datacontract.org/2004/07/xxxxx.xxxx")]


    Thank you in-advance    

    Thursday, September 4, 2014 8:55 AM

Answers

  • Hi All,

    I have found the solution. It's happened, because project use Document.OpenXml as reference. After removing the reference to the project now it use run time serializer

    Thank you ... :D 

    • Marked as answer by Prasad Livera Tuesday, September 9, 2014 5:51 AM
    Tuesday, September 9, 2014 5:50 AM

All replies

  • Hi All,

    I have found the solution. It's happened, because project use Document.OpenXml as reference. After removing the reference to the project now it use run time serializer

    Thank you ... :D 

    • Marked as answer by Prasad Livera Tuesday, September 9, 2014 5:51 AM
    Tuesday, September 9, 2014 5:50 AM
  • Hi,

    It's very glad to see that you have figured the issue out by yourself and it would be grateful if you could share the solution with us. and it would be helpful to other communities, and welcome to post your WCF question in this forum in your future programming.

    Regards


    Tuesday, September 9, 2014 9:20 AM
    Moderator