Bug 7406 - mono-xsd includes autoincremented columns in “Add…Row” signature
Summary: mono-xsd includes autoincremented columns in “Add…Row” signature
Status: NEW
Alias: None
Product: Compilers
Classification: Mono
Component: XSD ()
Version: unspecified
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-09-23 16:30 UTC by M. Hanselmann
Modified: 2012-09-23 16:30 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 7406 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description M. Hanselmann 2012-09-23 16:30:20 UTC
I'm trying to generate a strongly typed dataset which includes autoincremented columns. If I use Mono's xsd, the generated code includes the autoincremented column in the parameters for the “Add…Row” function on the DataTable. This does not happen when using Microsoft's xsd program (on Windows). I checked CustomDataClassGenerator.cs and it indeed does nothing special about these columns.

With the XSD below I get the following when using Mono's xsd:
  public virtual MyTableRow AddMyTableRow(long id, string name)

This is what Microsoft's xsd produces:
  public MyTableRow AddMyTableRow(string name)

Command for Mono: xsd test.xsd /d

$ mono --version
Mono JIT compiler version 2.10.9 (tarball Mon May  7 20:25:51 EDT 2012)

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema id="DsTest" targetNamespace="http://tempuri.org/DsTest.xsd" xmlns:mstns="http://tempuri.org/DsTest.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
  <xs:element name="DsTest" msdata:IsDataSet="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="MyTable">
              <xs:element name="id" type="xs:long" msdata:ReadOnly="true" msdata:AutoIncrement="true" 
msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" />
              <xs:element name="name" type="xs:string" />