Weird Duplicate Change Event Error from XSD.exe


Mark Olbert

Can someone explain to me why the following simple dataset:

<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="">
<xs:element name="meter_params">
<xs:element maxOccurs="unbounded" name="meter">
<xs:attribute name="fillColor" type="xs:string" use="required" />
<xs:attribute name="centerOffset" type="xs:int" use="required" />
<xs:attribute name="amount" type="xs:decimal" use="required" />
<xs:attribute name="schoolYear" type="xs:int" use="required" />
<xs:attribute name="changeDate" type="xs:string" use="required" />
<xs:element maxOccurs="unbounded" name="steps">
<xs:attribute name="amount" type="xs:int" use="required" />

when generated by:

xsd.exe /d meter_params.xsd

and then compiled in a website throws a whole bunch of "The type 'meter_params' already contains a definition for..." errors?

- Mark

Darren Kopp

Are you generating the typed dataset, and bringing the dataset into the
web application, while the schema document is in the web application
already and is marked to "generate dataset"? Jump into the xsd
document in visual studio and while in design mode right click an area
(not an element or anything like that) and un-check "Generate Dataset".

Darren Kopp

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question