Copying and registering TLB files during the deploy

Topics: General Questions, Getting Started/Beginner, Server Deployment, Tips and Tricks
May 17, 2011 at 8:24 PM

Hi there,

is it possible to copy and register tlb files using the regsvr32 utility ?. how can I perform such operations ? do I have to write a custom script ? or does the framework provide some functionality for that ?

Any help is welcome !!

thanks !

Julian

Coordinator
May 18, 2011 at 7:36 AM

Sure, you can use a CustomDeployTarget target in your .btdfproj with an Exec task to call regsvr32.exe.  To include the TLB files in the MSI, you can list them in an AdditionalFiles ItemGroup.

Thanks,
Tom

May 18, 2011 at 2:49 PM

Hi Tom

Thanks a lot for  your answer, however I still didn't figure out how to put the destination folder, I configure the group you mentioned above as follows:

<!--Tlb files-->
  <ItemGroup>
    <AdditionalFiles Include="CapGemini.Adecco.AW.Bts.TA.Framework.BAM.tlb">
      <LocationPath>H:\Projects\AdeccoWeb\TA\BizTalk\CapGemini.Adecco.AW.Bts.TA\CapGemini.Adecco.AW.Bts.TA.Framework.BAM\bin\Debug</LocationPath>
    </AdditionalFiles>
  </ItemGroup>

How can I indicate the destination folder ? does the <LocationPath> refer the path where the file is stored ?

Thank you in advance!

Julian

Coordinator
May 18, 2011 at 4:10 PM

First, like all LocationPath elements, the current working folder when the path is resolved will always be the Deployment Framework project folder (where .btdfproj is).  If CapGemini.Adecco.AW.Bts.TA is your solution root, you could just use ..\CapGemini.Adecco.AW.Bts.TA.Framework.BAM\bin\Debug.

AdditionalFiles only affects the packaging of the MSI. It will cause the referenced file to be dropped into the "solution root" equivalent location when the files are installed on the server -- i.e. "..".  So your Exec task with tlbimp.exe can simply reference "..\CapGemini.Adecco.AW.Bts.TA.Framework.BAM.tlb".

Thanks,
Tom

May 18, 2011 at 9:58 PM

Thank you very much !!! I finally implemented what you said above and it worked out !

BTDF is best Biztalk deployment framework ever !!

Julian

Coordinator
May 19, 2011 at 7:31 AM

Great!  Thanks Julian!  :-)

Tom