Issue with Biztalk mapper and external Assembly

We are using biztalk server 2010 and VS 2010. Recently, we've run into an issue where the external assembly we are trying to reference is not showing the list of available classes in the biztalk mapper. We have tried a lof of things in terms of rebuilding, adding it to the GAC, closing/opening VS, etc.

The strange situation we are in now is, if the assembly is in the GAC, we don't see the classes listed in the biztalk mapper. However, as soon as we un GAC the assembly, the classes appear and everything builds.  The only change i can think of is that we changed the target platform to "any CPU" versus the x86 we had done previously...but i don't think that should have an effect.

Why can't biztalk mapper see our classes when the assembly is IN the GAC, but can see them when it isnt??

Thanks for any help you can provide.

October 10th, 2011 7:21pm

Is it happening after the extenal assembly's version was changed? If yes, then the following blog might be of help.

http://blogs.msdn.com/b/sachipa_biztalk/archive/2009/01/21/calling-external-assembly-using-scripting-functoid.aspx

Free Windows Admin Tool Kit Click here and download it now
October 10th, 2011 7:52pm

We rebuilt the assembly, but it has the same assembly number. But, i'm not even referring to an existing map. If the assembly is now in the GAC, if i create a new map, drag out the scripting functoid and try to reference the assembly, it brings up the assembly name in the mapper, but the classes drop-down list is empty.

If i then un-install the assembly from GAC, go back to the same map, now all the classes appear fine.

Any other ideas? seems like a strange one.

October 10th, 2011 8:02pm

Hi Michael,

I made a sample available here: http://dl.dropbox.com/u/16742382/ExternalAssemblyConfiguration.zip, the sample is made in BizTalk 2006 but the principles are the same.

Basic the class must be like this:

using System;
using System.Collections.Generic;
using System.Text;

namespace MyNameSpace
{
    public class MyClass
    {
        public MyClass()
        {
        }

        public static string MyMethod()
        {
            return "hello world";
        }

     }
}

Remember, you need to sign the project, reference this project inside you map project and it needs to be present in the GAC before compiling the map. Also remember Dragging and dropping to “c:\WINDOWS\assembly” don’t work they moved the GAC (Global assembly cache) for .Net version 4.0.  It is now located here: “C:\WINDOWS\Microsoft.NET\assembly”

So to install the DLL

1.      Open the Visual Studio command prompt, as follows: Click Start, point to All Programs, point to Microsoft Visual Studio 2010, point to Visual Studio Tools, and then click Visual Studio Command Prompt (2010).

2.      Type the following command:

gacutil.exe /if "< path to the assembly .dll file >"

This installs the assembly to the GAC, overwriting any existing assembly that has the same assembly name.

Free Windows Admin Tool Kit Click here and download it now
October 10th, 2011 8:05pm

Sandro, we've done all that. We have been using this assembly in Biztalk for about 3 years...with no issues.  Something else has changed which is causing the issue.

Here's an example. in the given biztalk project, instead of making a project reference, i am adding a reference to the specific file DLL. I then can see the classes without any issues in the mapper.

I then use gacutil /if <assemblyname>, go back to the Map, and I can no longer see the classes. FYI, it's happening on 2 seperate developer machines.
Even if i follow your instructions of adding the DLL to the GAC, then adding the refernce to the map project and building...it doesnt' work. I've tried every variation i can think of...it the assembly is in the GAC, the mapper isn't able to see the classes.

 

October 10th, 2011 8:31pm

Is there any correlation with deploying the map to the BizTalk?
Free Windows Admin Tool Kit Click here and download it now
October 21st, 2011 1:43am

We are struggeling with the same problem. 

We found out, that any assembly having a data model of entity framework causes the behaviour. As long as you have at least one class deriving from DbContext in your assembly, biztalk mapper does not enlist the classes.


January 15th, 2014 9:13pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics