Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3440812
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:28:37+00:00 2026-05-18T08:28:37+00:00

I have a WCF service that returns a class that implements IExtensibleDataObject. I need

  • 0

I have a WCF service that returns a class that implements IExtensibleDataObject. I need to add a new field to this class. I updated the DataContract interface and made the change to the class. Now when I try to run my client application I get the following error:

Could not load file or assembly
‘xxx.yyyy.zzzz, Version=1.3.9.26111,
Culture=neutral,
PublicKeyToken=b09e2f3e9b5894f0’ or
one of its dependencies. The located
assembly’s manifest definition does
not match the assembly reference.
(Exception from HRESULT: 0x80131040)

The AssemblyVersion of the WFC class has been changed – does that break client?

EDIT:

There are clients in production that use this service. I do not want to make them update their service reference and redeploy their clients for this simple change if possible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:28:37+00:00Added an answer on May 18, 2026 at 8:28 am

    It depends on how you have set up your data contract.

    In WCF, using all the defaults, your service will use the DataContractSerializer (DCS) to serialize your object into XML. The DCS will serialize your fields in order – first the public ones, then the private ones. Within each visibility group, it will order the fields/properties alphabetically by name.

    Thus, if you introduce a new public property MiddleName and you already had FirstName and LastName, you would be fine: the old XML would have been

    <YourObject>
       ....
       <FirstName>.....</FirstName>
       <LastName>.....</LastName>
    </YourObject>
    

    and your new one would just simply add a new property at the end:

    <YourObject>
       ....
       <FirstName>.....</FirstName>
       <LastName>.....</LastName>
       <MiddleName>....</MiddleName>
    </YourObject>
    

    Such an update “add something at the end” should work just fine, the DCS will just simply ignore additional tags in the XML.

    However: had you introduced a property called Gender, that would be stuck between <FirstName> and <LastName> and would thus break the order of the data in your XML and thus would break the data contract – no “old” client will be able to call your new service.

    In order to take control of this, you can put specific Order= attributes on your data members in your data contract:

    [DataContract]
    public class SomeAddress
    {
       [DataMember(Order=0)]
       public string FirstName;
    
       [DataMember(Order=1)]
       public string LastName;
    }
    

    Then you could easily add a new property – just add it to the end of the list!

    [DataContract]
    public class SomeAddress
    {
       [DataMember(Order=0)]
       public string FirstName;
    
       [DataMember(Order=1)]
       public string LastName;
    
       [DataMember(Order=2)]
       public string Gender;
    }
    

    So by using the Order= attribute on your data contracts, you can take control of your XML layout, and you can make simple extensions of existing data contracts non-breaking updates.

    For more background and in-depth know-how, you ought to read Serialization in Windows Communication Foundation on MSDN Magazine’s web site – highly recommended.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My AJAX-enabled WCF service returns JSON using this contract, [DataContract] public class JQGridContract {
I have a WCF service that returns JSON to the clients. This is the
I have a WCF service that I need to call in a ASP.NET web
We have a WCF service that exposes a Customer type, i.e.: [DataContract(Name = CustomerData,
I have a WCF service that implements a command pattern. Using reflection, I've created
I have a WCF service that returns a stream object. But for some reason
I have a WCF service that returns a stream object. But for some reason
I have a WCF web service method that returns a List<> object and also
I have a wcf service which exposes a function that returns a complex type
I have a simple WCF service which has a method that returns a complex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.