问题
I have a target schema that imports 2 more scehmas. When the schema files are in the same project as the map then I have no problem. However, if the schemas are in a separate Schemas project (as per good practice) then on building the map I get the error:
*Cannot load source/destination schema: xxx.BS.CardPayments.Schemas.Projx.Service1_tempuri_org. Either the file/type does not exist, or if a project dependency exists, the dependent project is not built.*
I have tried copying schemas dll to GAC before building map but this didn't help.
Any suggestions gratefully received!
Thanks*emphasized text*
Rob
回答1:
Rob, When your schemas are in the same project as your map, the map will reference them by file name. If you move the map to another project and try to open it, the BizTalk map editor won't find those files anymore. You can see this clearly if you open the map using notepad or an XML editor (search for the Location attribute near the top of the file).
The solution is to reference the schemas using their fully qualified .NET type name - i.e. namespace + type name. You can get these values from the properties window when the schema file is selected in Solution Explorer.
Hope it's clear, let me know if you require any clarification.
来源:https://stackoverflow.com/questions/6317879/biztalk-map-destination-schema-imports-multiple-schemas