[Bamboo Knowledge Base]
MSBuild タスクを設定する方法は次のとおりです。
Complete the following settings:
| MSBuild 構成 | |
|---|---|
| タスクの説明 | A description of the task, which is displayed in Bamboo. |
| 実行可能ファイル | The MSBuild executable that is available to perform the task. The executable that you select will become one of the task's (and so, the job's) requirements. You can add other executables, if required. |
| プロジェクト ファイル | The name of the solution, project file or MSBuild project to execute, e.g. ExampleSolution.sln. You can include variables (see Bamboo variables). |
| オプション | 含める MSBuild のコマンド ライン オプション。 Bamboo tries to tokenise the contents of the Options field and passes those as arguments when it runs MSBuild. You should use a semi-colon to separate options, and quotes around parameters that contain spaces. For example: /p:Configuration="Any CPU";/p:PublishProfile="Dev Server" Note that Bamboo 5.6 parses the contents of the Options field slightly differently from Bamboo 5.5. See below for how to use the MSBuild response file with Bamboo. You can also include variables (see Bamboo variables). |
必要に応じて、環境変数と作業ディレクトリの設定を指定します。
| 環境変数 | (Optional) Additional system environment variables that you want to pass to your build. Note that existing environment variables are automatically available to the executable. You can also include Bamboo global or build-specific variables (see Bamboo variables). |
| Working Sub Directory | (オプション) Bamboo が実行ファイルを実行する、ジョブのルート ディレクトリに相対的な代替サブディレクトリ。ルート ディレクトリには、ジョブの構成済みソース リポジトリから確認されたものがすべて含まれます。このフィールドを空白のまま残した場合、Bamboo はルート ディレクトリでビルド ファイルを検索します。このオプションは、サブディレクトリ内にビルド スクリプトがあり、実行可能ファイルをそのサブディレクトリ内から実行する必要がある場合に便利です。 |
| Powershell スクリプトとして実行 | (オプション、Windows のみ).bat ファイルを解釈する cmd.exe ではなく Powershell でスクリプトを実行するには、「Powershell スクリプトとして実行」チェックボックスをチェックします。インライン エディタは Powershell 構文をサポートします。 |
Bamboo 5.6 can make use of the MSBuild response file. This allows you to use the same settings with Bamboo as you use when calling MSBuild on the command line.
When this is enabled, the contents of the Projects File and Options fields are written to the response file:
# MSBuild response file generated by Atlassian Bamboo %CONTENTS_OF_OPTIONS_FIELD% %CONTENTS_OF_PROJECTS_FILE_FIELD%
and Bamboo will run the following command:
msbuild.exe @<full-path-to-response-file>response-file.rsp
To enable Bamboo to use the response file, you need to set the bamboo.plugin.dotnet.msbuild.useResponseFile system property to true.
There are a couple of ways to do that:
If you start the Bamboo server or remote agents manually you can set the property on the command line, as an argument to the JVM, like this:
-Dbamboo.plugin.dotnet.msbuild.useResponseFile=true
Do this on all Bamboo agents, and on the Bamboo server if you use local agents.
If your agents are run as a service, set the system property in the <Bamboo agent home directory>/conf/wrapper.conf configuration file, like this:
# The Bamboo Agent home configuration file wrapper.java.additional.1=-Dbamboo.home=/home/bamboo/bamboo-agent-home wrapper.java.additional.2=-Dbamboo.agent.ignoreServerCertName=false wrapper.java.additional.3=-Dbamboo.plugin.dotnet.msbuild.useResponseFile=true
If your Bamboo server runs as a service, set the system property in the <Bamboo home directory>/conf/wrapper.conf configuration file.