BTSTask and BTSControl for BizTalk 2009

懵懂的女人 提交于 2020-01-05 11:14:21

问题


I am using BTSTask and BTSControl to do some deployment operation 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?


回答1:


I would instead look at the BizTalk Deployment Framework. Its built on MSBuild and WIX and does absolutely everything from adding developer tools to quickly deploy things for development to handling patching via WIX. I highly recommend it.




回答2:


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.




回答3:


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:

BizTalk 2009 - Build & Deploy automation with Team Foundation Server 2008 – Part 1



来源:https://stackoverflow.com/questions/3149770/btstask-and-btscontrol-for-biztalk-2009

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!