Microsoft BizTalk Mapper Unable to load wrapper

Sometimes errors seem to find me, sometimes it fills that I’m chasing errors! And because someone did something that you shouldn’t do, configuring the build folder of a Functoid project to be <BizTalk Server installation folder>\Developer Tools\Mapper Extensions directory, I got a new and strange error while trying to open a BizTalk map inside Visual Studio: Microsoft BizTalk Mapper Unable to load wrapper. Here is the full error message:

Microsoft BizTalk Mapper

Unable to load wrapper <BizTalk Server installation folder>\Developer Tools\Mapper Extensions\Microsoft.BizTalk.Interop.Agent.dll

Microsoft BizTalk Mapper Unable to load wrapper

Of course, at that time I was quite curious to know the cause of this problem because I didn’t do anything wrong, just building a custom Functoid project and a few minutes before I actually was working on a map and I was able to open without any kind of problems.

Cause

When you build a project, by default any kind of project it will add the project assemblies as well as the dependencies to the bin\Debug\ – again this is the default behavior.

In this case, by changing this behavior in a Custom Functoid project to the <BizTalk Server installation folder>\Developer Tools\Mapper Extensions directory, was causing the problem, because it was adding not only the custom Functoid assembly but also some BizTalk internal assemblies, in this case the Microsoft.BizTalk.Interop.Agent.dll, that are incompatible with the internal BizTalk Mapper wrapper.

Microsoft BizTalk Mapper Unable to load wrapper cause

Note: BizTalk Server installation folder>\Developer Tools\Mapper Extensions directory is where Visual Studio BizTalk project looks for custom functoids to be added to the Toolbox.

Solution

Once again, the solution is simple, you should delete all the unnecessary assemblies, especially the internal ones of the product.

Once you delete all the unnecessary assemblies, in this case, the Microsoft.BizTalk.Interop.Agent.dll, and I also advise to delete all the ones that are selected on the above picture, the Unable to load wrapper problem will be solved and you can once again open the BizTalk Mapper without any kind of problems inside Visual Studio

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.

Leave a Reply

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

turbo360

Back to Top