How does .NET decide which duplicate element names in reference.cs to rename RRS feed

  • Question

  • Hello

    I regularly work on schema maintenance projects for services that our MVC applications consume. I use VS2017 to open a solution and configure/update service references. The end result that I'm interested in is the recreation of the reference.cs file for each service reference refreshed (because it's schema has changed).

    What I observe and it may be triggered by poor schema design, is that some services contain duplicate element names identifiable or separated only by their source .xsd. During the creation of the reference.cs file, .NET will rename duplicate element names by simply adding a number/index to the name.


    CustomerType, CustomerType1, CustomerType2

    What I need to understand is how .NET determines which duplicate element name gets "renamed". I assume there is some ordering scheme that is followed. 

    Any help would be much appreciated.

    Thanks in advance.

    Saturday, September 15, 2018 4:11 PM

All replies

  • Web stuff can be discussed at the ASP.NET forums.


    Saturday, September 15, 2018 4:45 PM