ExternalAssemblies vs Components

Topics: General Questions
Feb 17, 2012 at 4:08 PM

What is the difference between using ExternalAssemblies vs Components.

I know that there is <IncludeComponents>, when set to True will recognize the Helper C# libraries in the solution and include it in the msi. But what about <ExternalAssemblies> ?

I was having this error "Could not enlist orchestration 'xxx.Orchestration, xxx.publisher, Version=1.0.0.0, Culture=neutral, PublicKeyToken=a51fdd9ab5ff7641'. FileNotFoundException exception occurred while the XLANG/s runtime enlisted a service."

"Error message:Could not load file or assembly 'xxxApplicationVariablesClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=8ba4484f2a8f0d14' or one of its dependencies. The system cannot find the file specified."

But when i see the deploy logs, here is where is it is GACed.

  Assembly successfully added to the cache                "D:\Program Files (x86)\covidien.agile.eco.publisher\1.0\Deployment\Framework\DeployTools\gacutil.exe" /i "..\xxxApplicationVariablesClient.dll"                Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1                Copyright (c) Microsoft Corporation.  All rights reserved.

  Assembly successfully added to the cache                "D:\Program Files (x86)\covidien.agile.eco.publisher\1.0\Deployment\Framework\DeployTools\gacutil.exe" /i "..\xxxApplicationVariablesLibrary.dll"                Microsoft (R) .NET Global Assembly Cache Utility.  Version 4.0.30319.1                Copyright (c) Microsoft Corporation.  All rights reserved.

This dll is referenced from the SharedLibraries.

So here is how i am including the library and another library it is depending on. I checked the manifest for this assembly. It doesnt refer to any other dll.

<ItemGroup>    <Components Include="xxxApplicationVariablesClient.dll">      <LocationPath>..\ExternalComponents</LocationPath>    </Components>    <Components Include="xxxApplicationVariablesLibrary.dll">      <LocationPath>..\ExternalComponents</LocationPath>    </Components>  </ItemGroup>

But when i manually GAC them, the deployment succeeds.

Anything wrong?

 

-Satya

Coordinator
Feb 20, 2012 at 7:14 AM

Hi Satya,

Generally, if your solution includes one or more projects with source code for .NET helper assemblies, then put them under a Components ItemGroup.  If you have one or more .NET assemblies that do not have projects with source code and they need to be installed in the GAC, then put them under ExternalAssemblies.  The two are not very different, and in most cases you won't go wrong by putting all of them under Components.

There are two GAC's, one for .NET 4.0 assemblies and one for .NET 2.x/3.x assemblies.  Are you sure that the assemblies are ending up in the same GAC for the version of .NET that BizTalk is running?  You didn't mention which version of BizTalk.

Thanks,
Tom