Dear,

I have used xsd.exe tool to generate a class from a
schema. Then I used XMLSerializer to deserialize an xml
file using that class, changed some values, and serialized
it back to a new xml file.

Error occurs here, the new file has some attribute missing
which I have not changed anything about it.

The missing attribute in the original schema is defined
like this:
<xsd:attribute name="country" type="xsd:NMTOKEN"
fixed="US" />

because of the error occured, I changed the schema into
the following:
<xsd:attribute name="country" type="xsd:NMTOKEN"
use="required" />

Then it works! With no missing attribute!

Can anybody know about this bug? And how to fix it?

Regards,
Grace