Question

I am trying to create a BizTalk application (App1) and add resources using the BTSTask command line utility. Some of the App1 BizTalk assemblies depend on a few SharedApp BizTalk assemblies. I added the SharedApp assemblies to the GAC using gacutil and verified they were present in the GAC. When I run BTSTask AddResource, the command fails for any App1 BizTalk assembly that depends on any of the SharedApp assemblies.

The error message tells me a specific SharedApp dll cannot be found for reference. I have verified the details (name, version, etc.) on the SharedApp assembly are correct; it is the correct assembly and is present in the GAC.

Shouldn't BizTalk be able to detect those SharedApp assemblies in the GAC and allow them to be used as reference assemblies when I call AddResource?

Any thoughts on why adding the SharedApp assemblies to the GAC did not solve my problem?

EDIT: Adding command line example text

BTSTask.exe AddApp -ApplicationName:App1 -Server:BTServer1 -Database:BTDatabase1 -Description:App1_instance
BTSTask.exe AddResource -ApplicationName:App1 -Source:"path_to_App1.Assembly.dll" -Destination:"destination_path_for_App1.Assembly.dll" -Type:BizTalkAssembly -Options:GacOnAdd,GacOnInstall -Overwrite -Server:BTServer1 -Database:BTDatabase1
Was it helpful?

Solution 2

After spelunking into our automation and enabling detailed logs, I was able to get a clearer error message:

Error: Assembly "App1.Assembly, Version=1.0.0.0, Culture=neutral, PublicKeyToken=xxxxxxxxxx" references the following assemblies that must be deployed before deploying this assembly: Assembly "SharedApp.Services, Version=1.0.0.0, Culture=neutral, PublicKeyToken=yyyyyyyyyyyyyyyy"

After an online search for that error, I uncovered the following from a discussion post:

If [a] DLL contains XSD (BizTalk) schemas it must also be deployed to the BizTalk management database.

Apparently, this must be done in addition to adding the assemblies to the GAC. This is the reason why adding App1 assemblies to my application would fail; although I added the SharedApp BizTalk assemblies to the GAC, they were also needed in the BizTalk management database.

Thank you to those who took a look at this issue.

OTHER TIPS

Is this BizTalk 2010? In that case, it might be something to do with the 'dual cache' that was introduced with .NET 4.0. As you might know, there are now 2 global assembly caches and assemblies from the 2.0 GAC cannot use 4.0 GAC assemblies.
So maybe your SharedApp is in the .NET4.0 cache and the resource you want to add is compiled against an older version of BizTalk?

Just thinking out loud, you never know if it helps. Cheers

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top