BizTalk Mapper – Cannot load source/destination schema

Recently I try to test a BizTalk map the test fails and for my surprise, it gives me the following error:

“Cannot load source/destination schema: “schema_name”. Either the file/type does not exist, or if a project dependency exists, the dependent project is not built.”

Cause

  • For some reason, the BizTalk designer loses the schema reference and it is a little hard trying to “trick” the designer into remembering the schema’s location.

Solution

  • Unload/load project shortcuts to sort of refresh the VS shell with the references.
  • Make a new importation of the schemas to the map.

If you are working with BizTalk Server 2009 and Visual Studio 2008, there are some issues that can cause this problem:

  • Map loses information about schemas: I have seen several times, that even after choosing a source and a destination schema for a map, dragging a couple of links in the map and saving it, then at compile-time, I get an error about the map not having a source and destination schemas. So I need to choose them again and redo all the links because they have magically disappeared. This happens for maps that use both schemas from the same project as schemas from referenced projects.
  • Autosave a map before schemas are chosen: When you add a new map then at some point VS.NET autosaves the map, but if this happens before you have chosen both the source and destination schema you suddenly get an error, which you really do not expect, because you weren’t doing anything at the time of the error. This also occurred in previous versions of BizTalk.

References

Author: Sandro Pereira

Sandro Pereira lives in Portugal and works as a consultant at DevScope. In the past years, he has been working on implementing Integration scenarios both on-premises and cloud for various clients, each with different scenarios from a technical point of view, size, and criticality, using Microsoft Azure, Microsoft BizTalk Server and different technologies like AS2, EDI, RosettaNet, SAP, TIBCO etc. He is a regular blogger, international speaker, and technical reviewer of several BizTalk books all focused on Integration. He is also the author of the book “BizTalk Mapping Patterns & Best Practices”. He has been awarded MVP since 2011 for his contributions to the integration community.

3 thoughts on “BizTalk Mapper – Cannot load source/destination schema”

  1. I’m getting this with VS2012 and BTS2013, for a project that was migrated from (VS2008+BTS2009).

      1. I have figured out the problem. For some reason the original developer never checked in the AssemblyInfo file so when I would download the code from TFS I would make a new AssemblyInfo file by going to the project’s properties and clicking the Assembly Information button. However, this for some reason creates a regular assembly’s AssemblyInfo file which is missing a key item.

        [assembly: Microsoft.XLANGs.BaseTypes.BizTalkAssembly(typeof(Microsoft.BizTalk.XLANGs.BTXEngine.BTXService))]

        Once this line is added to the bottom of the AssemblyInfo file it works.

Leave a Reply

Your email address will not be published. Required fields are marked *

turbo360

Back to Top