Excute custom commands using the BizTalk Deployment Framework

As I previously wrote, we are using BizTalk Deployment Framework to deploy webservices for our BizTalk applications.
Now I wanted to make sure that the application pool on which these webservices are running is set up correctly, even though we don’t manage these ourselves.
Since the BTDF is built using MSBuild, we can use MSBuild command to execute custom applications and commands, and I decided to use this functionality for my purposes.
Here is the code I use for this, place this after the last ItemGroup in your .btdfproj file.
This particular piece of code sets the runtime version and pipeline mode of our application pool, but you can pretty much use this with any command.

<!-- Set AppPool .NET version -->
<Target Name="CustomPostDeployTarget">
    <Exec Command="&quot;C:\Windows\System32\inetsrv\appcmd.exe&quot; set APPPOOL /apppool.name:&quot;BizTalkBasicHttp&quot; /managedRuntimeVersion:v4.0 /managedPipelineMode:Integrated" />

One thought on “Excute custom commands using the BizTalk Deployment Framework

Leave a Reply

Your email address will not be published. Required fields are marked *