I always take compiler warnings seriously and at least investigate them before releasing.
In one of the solutions I work on I consequently received the warning ‘Cannot resolve the ‘schemaLocation’ attribute’. This solution contains a BizTalk project with a lot of schemas. For each schema multiple occurrences of this warning where reported. This lead to a long list of warnings.
Although this is a warning and it didn’t seem to bother anything at run-time I didn’t like the excessive list of warnings.
It turned out that the BizTalk compiler is quite strict in the way the imports are defined for schemas in other assemblies. We have schema types defined in schemas in other assemblies. We reference those assemblies and use the types in the schemas. Something like this:
<xs:import namespace="http://biztalk_server_project1.myschematypes" schemaLocation="BizTalk_Server_Project1.MySchemaTypes" />
As you can see we had the ‘namespace’ before the ‘schemaLocation’ attribute in the import statement. We manually added the import statements and didn’t bother about the sequence of those attributes. However it seems the BizTalk compiler wants the imports to be defined as:
<xs:import schemaLocation="BizTalk_Server_Project1.MySchemaTypes" namespace="http://biztalk_server_project1.myschematypes" />
This also the sequence used when you import a schema in the BizTalk schema editor.
After putting all the ‘schemaLocation’ attributes before the ‘namespace’ attributes the warnings were gone.
Not a showstopper but still worth mentioning in my view.