There is nothing more frustrating than opening a complex BizTalk Map only to find a blank screen and an error message stating that the Source or Destination schema cannot be loaded. Usually, this happens when you rename a file, move it to another project, or update a reference.
Recently, I tried to test a BizTalk map, but the test fails and to my surprise, it gave 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.”
📝 One-Minute Brief
ncountering a “Cannot load source/destination schema” error in the BizTalk Mapper is usually caused by broken file references, assembly version mismatches, or the schema file being moved/renamed. This guide provides a step-by-step troubleshooting checklist—from verifying the “Source/Target Schema” properties to cleaning the solution and re-selecting the schema—to restore the visual mapping interface without losing your existing links.
Cause
The BizTalk Mapper stores the link to your schemas as a relative path and a fully qualified assembly name. If the Mapper cannot find the schema via the path or the compiled DLL, it gives up.
- For some reason, the BizTalk designer loses the schema reference, and it is a little hard 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 schema. 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 and 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
Most Mapper loading issues are caused by “stale” references. By rebuilding your solution and re-linking the schemas through the Properties window, you can usually restore your map and its links in seconds.
I’m getting this with VS2012 and BTS2013, for a project that was migrated from (VS2008+BTS2009).
Same here. Issue with Visual Studio 2013 and BizTalk 2013R2. The project was converted from VS 2010 and BizTalk 2009. Any updates?
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.