SimpleContent not working correctly

Dec 21, 2013 at 1:12 PM
Hey, so far everything went smoothly but when I tried this xsd errors came out. I have simple example:
<simpleType name="waluta_type">
        <restriction base="token">
            <enumeration value="PLN"/>
            <enumeration value="EUR"/>
            <enumeration value="GBP"/>
            <enumeration value="USD"/>
        </restriction>
</simpleType>
    
    <complexType name="cena_type">
        <simpleContent>
            <extension base="double">
                <attribute name="waluta" type="moja:waluta_type" use="required"/>
            </extension>
        </simpleContent> 
    </complexType>
    
xsd2code does not generate property for waluta:
[System.Xml.Serialization.XmlTypeAttribute(Namespace = "http://example/MS/")]
    [System.Xml.Serialization.XmlRootAttribute(Namespace = "http://example/MS/", IsNullable = true)]
    public partial class cena_type : EntityBase<cena_type>
    {

        [EditorBrowsable(EditorBrowsableState.Never)]
        private double valueField;

        [System.Xml.Serialization.XmlTextAttribute()]
        public double Value { get; set; }


        [System.Xml.Serialization.XmlAttributeAttribute()]
        public waluta_type waluta
        {
            get
            {
                return this.walutaField;
            }
            set
            {
                this.walutaField = value;
            }
        }
    }
and I receive and error that [...] does not contain a definition for 'walutaField' and no extension method 'walutaField' accepting a first argument of type 'ConsoleApplication1.cena_type' could be found (are you missing a using directive or an assembly reference?). Do you happen to know what is wrong?