web.configの接続文字列を変更するためのPowerShellスクリプトを少し作成しました。TFSビルドプロセスからPowerShellスクリプトにパラメータを渡す方法は?
param([string]$webConfigPath, [string]$connectionStringName, [string]$connectionStringValue)
# get the full path of the web config file
$webConfigFile = [IO.Path]::Combine($webConfigPath, 'Web.config')
# load the XML
$webConfig = [xml](cat $webConfigFile)
#change the appropriate config
$webConfig.configuration.connectionStrings.add | foreach {
if($_.name -eq $connectionStringName){
$_.connectionString = $connectionStringValue
}
}
#save the file
$webConfig.Save($webConfigFile)
ビルドプロセスに追加しました。ビルドの変数をスクリプトに渡すには?
(私は新しいスクリプトベースのビルドプロセスを使用するので、私は唯一のパラメータに組み込み、「引数」フィールドを持っている)
web.configの変更は、ビルドプロセスではなくリリースプロセス中に行われます。 –
ビルドプロセスを使用して、すべてのチェックイン時に2つのテストサーバーにサイトを配置します。どのようにビルドプロセスなしでそれを行うには? –