none
Why is XSD file creasting a second designer file RRS feed

  • Question

  • I am working with ADO.net datasets that I create in the designer (Visual Studio 2015 Community edition). In Visual Studio Solution Explorer this produces a xxx.cs file indented beneath the xxx.xsd file and a xxx.Designer.cs file indented beneath that.

    In some circumstances (I have not yet worked out exactly what these are) as second designer file, xxx1.Designer.cs is created indented beneath the xxx.xsd file. This leads to lots of duplicate object errors.

    One of the circumstances that can cause this is if I add a new column to the data table in the designer. The new columns are in xxx1.Designer.cs but not in xxx.Designer.cs. My current work around for this is to close the solution, delete xxx.Designer.cs and remane xxx1.Designer.cs to xxx.Designer.cs. 

    How can I sort this out?


    Mike VE

    Monday, November 16, 2015 7:17 AM

Answers

  • Hello,

    >>One of the circumstances that can cause this is if I add a new column to the data table in the designer

    I tried to reproduce you mentioned scenario, and did what you described, however, it did not generate an additional xxx1.Designer.cs file, so that sounds strange on your side, you have such a kind behavior.

    >>My current work around for this is to close the solution, delete xxx.Designer.cs and remane xxx1.Designer.cs to xxx.Designer.cs.

    Maybe you could delete the xxx.Designer.cs file and rename xxx1.Designer.cs to xxx.Designer.cs without close the solution. Of course, this should not be a good experience, please try:

    1.Create a new solution and check it still causes the strange behavior

    2.If on your side, this scenario always occurs, try to post it to the ms team:

    https://connect.microsoft.com/VisualStudio

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 17, 2015 3:41 AM
    Moderator

All replies

  • Hello,

    >>One of the circumstances that can cause this is if I add a new column to the data table in the designer

    I tried to reproduce you mentioned scenario, and did what you described, however, it did not generate an additional xxx1.Designer.cs file, so that sounds strange on your side, you have such a kind behavior.

    >>My current work around for this is to close the solution, delete xxx.Designer.cs and remane xxx1.Designer.cs to xxx.Designer.cs.

    Maybe you could delete the xxx.Designer.cs file and rename xxx1.Designer.cs to xxx.Designer.cs without close the solution. Of course, this should not be a good experience, please try:

    1.Create a new solution and check it still causes the strange behavior

    2.If on your side, this scenario always occurs, try to post it to the ms team:

    https://connect.microsoft.com/VisualStudio

    Regards.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, November 17, 2015 3:41 AM
    Moderator
  • Thanks for the reply.

    I don't have this problem in other projects. I guess there must be some kind of corruption somewhere in the base file. I'll add to this thread if I can pin it down any more precisely.


    Mike VE

    Tuesday, November 17, 2015 1:21 PM