Question

I have a two-project solution - one project contains my schemas and BizTalk orchestration, and the other contains a DLL that is referenced from my orchestration and does that actual work (it's shared code, so there's no chance I can just incorporate it into the BizTalk assembly). The second assembly is added as a reference from the BizTalk one, and I can reference the methods in #2 from the orchestration without any trouble.

However, when I deploy from VS -> BizTalk, it doesn't take my resource assembly with it - it just deploys the BizTalk assembly. If I attempt to trigger my orchestration, I'll get an error that the referenced assembly couldn't be loaded, but once I add it to the GAC and the "Resources" list for my BizTalk app, things run perfectly.

How can I flag this assembly as something that has to be deployed with my BizTalk assembly? Am I just missing a setting on the reference somewhere?

Was it helpful?

Solution

Place the following statements in a batch file and run it from VS Command Prompt

BTSTask AddResource -Source:.\Assemblies\Schemas.DLL 
  -ApplicationName:MyApp -Type:System.BizTalk:BizTalkAssembly 
  -Options:GacOnImport,GacOnInstall -Overwrite
BTSTask AddResource -Source:.\Assemblies\Orchestrations.DLL 
  -ApplicationName:MyApp -Type:System.BizTalk:BizTalkAssembly 
  -Options:GacOnImport,GacOnInstall -Overwrite
BTSTask AddResource -Source:.\Assemblies\SharedLib.DLL 
  -ApplicationName:MyApp -Type:System.BizTalk:Assembly 
  -Options:GacOnImport,GacOnInstall -Overwrite
BTSTask ExportApp -ApplicationName:MyApp -Package:MyApp.msi

You get an MSI at the end, which you would need to import! This addresses your problem.

OTHER TIPS

I don't believe there's a solution from adding a resource to the BizTalk application automatically.

I usually use scripts to deploy to BizTalk and so I add resources as part of those (but, to be fair, I usually have more than 2 assemblies); BTSTask is the BizTalk command line utility that you can use to do that (or, if you're using MSBuild you can use the "SDC tasks"

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