xsd.exe Is it possible for the generated C# file to contain the schema version

30 Views Asked by At

I have a schema file like the following (this is completely stripped)

<?xml version="1.0"?>
<xs:schema version="1.0.2" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="layout">
        <xs:complexType>
            <xs:sequence>
                <xs:element name="header">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="name" type="xs:string"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
</xs:schema>

Is there any way I am able to have the C# file contain the schema version (in this case it would be 1.0.2) somewhere. I want to be able to simply look at the C# file and determine if its outdated based on version. Even if its not stored as a property at the very least in an auto generated comment or something. I cant find anything about xsd.exe that allows this but thought Id at least post this question just in case it is possible and Im not finding it.

0

There are 0 best solutions below