tags:

views:

32

answers:

2

Hi, I am using BTSTask and BTSControl to do some deployment opertation on a BizTalk 2006. we moved to BizTAlk 2009 and these tools seem to not work with BT2009. are there any specific version or new tools for BT2009?

Thanks,

-Idriss

A: 

Hey Idriss, I have no personal experience with BTSTask or BTSControl but I have actually been able to utilize Team Foundation Server to great success with Biztalk 2009. I basically followed the article outlined below and then customized it from there for my own environment:

http://blogical.se/blogs/mikael/archive/2009/02/11/biztalk-2009-build-amp-deploy-automation-with-team-foundation-server-2008-part-1.aspx

Andrew Dunaway
Thanks a lot Andrew for this link. trouble is we're not supposed to have Visual Studio and Team Build on the same BizTalk deployment machine. so custom BizTalk deployment tasks are great but not applicable in my case :(
Idriss
I think it would still work if I am understanding your concern right. In my environment we have a build server, my dev box, a QA server, and the production server. The QA server and production server have no VS or Team Build installed on them. The install is done by referencing the BizTalk database (effectively the same as importing an msi). Currently I do have an extra step of GAC'ing the dlls with a batch file. I have prototyped automating this but I have not implemented it yet (ran out of architecture time).
Andrew Dunaway
A: 

I did hit the same limitation with BizTalk 2009 but managed to work around using Microsoft.BizTalk.ExplorerOM from within PowerShell scripts.

Example for Stopping and Starting BizTalk Applications

(following this excellent blog post on BizTalk Deployments with PowerShell)

param
(
    [switch] $start,
    [switch] $stop,
    [string] $appName,
    [string] $connectionstring
)


    function Stop-Application
    {
        $app = $catalog.Applications[$appName]

        if ($app -eq $null)
        {
            Write-Host "Application " $appName " not found" -fore Red
        }
        else
        {
            if ($app.Status -ne 2)
            {
                $null = $app.Stop(63)
                $null = $catalog.SaveChanges()
                $null = $catalog.Refresh()
                Write-Host "Stopped application: " $appName -fore Green
            }
            else
            {
                Write-Host "Application: " $appName " already stopped" -fore Yellow
            }
        }
    }


    function Start-Application
    {
        $app = $catalog.Applications[$appName]

        if ($app -eq $null)
        {
            Write-Host "Application " $appName " not found" -fore Red
        }
        else
        {
            if ($app.Status -eq 2)
            {
                $null = $app.Start(63)
                $null = $catalog.SaveChanges()
                $null = $catalog.Refresh()
                Write-Host "Started application: " $appName -fore Green
        }
        else
        {
            Write-Host "Application: " $appName " already started" -fore Yellow
        }
    }
}


$null = [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.BizTalk.ExplorerOM")

$catalog = New-Object Microsoft.BizTalk.ExplorerOM.BtsCatalogExplorer
$catalog.ConnectionString = $connectionstring


if ($catalog.Applications -eq $null)
{
    Write-Host "Application catalog is empty" -fore Red
}


if ($start)
{
    Start-Application
}


if ($stop)
{
    Stop-Application
}

Our BizTalk deployment is driven by MSBuild, BTSTask and ExplorerOM via PowerShell. I even managed to solve the problems when deploying Assemblies other Assemblies (or Ports) depend on.

Filburt