BAM WCF Interceptor deployment support

Topics: Server Deployment
Mar 11, 2014 at 5:56 PM
Is there a way to deploy BAM WCF interceptor config file using deployment framework?
Coordinator
Mar 11, 2014 at 7:30 PM
Yes there is.
<ItemGroup>
  <AdditionalFiles Include="MyInterceptor.xml">
    <LocationPath>..\</LocationPath>
  </AdditionalFiles>
</ItemGroup>

<Target Name="DeployBamInterceptor" DependsOnTargets="DeployBam">
  <Exec Command="&quot;$(BtsDir)Tracking\bm.exe&quot; deploy-interceptor -Filename:&quot;..\MyInterceptor.xml&quot;" />
</Target>
The ItemGroup is there to tell the Deployment Framework to add MyInterceptor.xml to the MSI. It's easiest to keep the file one level up from the Deployment project folder, because it will always end up there on the server after the MSI install.

You can add another target if needed that depends on UndeployBam.

Thanks,
Tom
Marked as answer by xs2bharat on 3/11/2014 at 1:53 PM
Mar 11, 2014 at 8:52 PM
Thanks for quick response. I was able to deploy interceptor using following target <Target Name="DeployBamInterceptor" AfterTargets="DeployBam"> instead of one you mentioned. Due to some reason, when I specified DependsOnTarget, it was not executing it. I might be missing some additional configuration.

Bharat