GAC stings again....
But anyway - I was working the other day making some changes to one of our classes and, as most of our classes have both code and schema representation, I went on to generate the schema from the modified class.
So - I've built the project with the class to generate an assembly, and in Visual Studio command line I swiftly 'CD'-ed to the bin folder the project and used XSD.exe to generate the schema in order to replace my existing one to reflect the recent changes.
However, to my great surprise, the generated schema did not have any of the added nodes I expected to see - it looked suspicously identical to the old schema I had.
It took me quite a few attempts before I've realised what's happening - as you can imagine from the title of this post the answer lies in the GAC - I had the older version of the assembly containing class in the GAC and so XSD.exe, although being pointed by me a specific assembly in the bin folder, has decided to pick the old one from the GAC and use it to reflect the class.
As soon as I removed the old version from the GAC XSD.exe was happy enough to generate the correct schema for me.