views:

364

answers:

2

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?

A: 

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"

Yossi Dahan
+1  A: 

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.

Naveen Karamchetti
My problem is that these files aren't included in my deployment by default - when I deploy, I'd expect any required assemblies to be deployed as well, so that the application is ready to run, and this just isn't the case. Oh well - thanks for your answer.
rwmnau