I've recently been struggling with yet another xsd issue - importing schemas.
I've found that when importing schemas, multiple imports of the same 'base' schema cause duplicate type declarations, which VS.NET prevents.
1. Define a datatype "MyDT" in a schema called CommonSchema.xsd
2. Create a second schema, which imports CommonSchema, called SchemaA.xsd.
3. Create a new schema, SchemaB.xsd, which itself imports CommonSchema.xsd.
4. Try to import SchemaA.xsd into SchemaB.xsd. VS.NET will throw an exception:
"1. The simpleType 'http://xyz.com/schemas/CommonSchema:MyDT' has already been declared. An error occurred at ..."
This makes some sort of sense, but I think VS.NET should be able to resolve this issue?
Interestingly, if I do the same operation in XMLSpy, it can validate the schema without errors - which suggests that this import scenario is valid within an XSD, just not within BizTalk schemas?
Has anyone come across the same issue, and if so, did you manage to solve it? (I've tried playing with RootReferences, namespaces etc., with no luck.)