> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# execute (MSBuild)

> Runs MSBuild operations on an MSBuild project file and deliver artifacts. Target Properties Property Name Property Code Required Description MSBuild H

Runs MSBuild operations on an MSBuild project file and deliver artifacts. 

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>MSBuild Home</td><td>`FDMSB_MSBUILD_HOME`</td><td>Yes</td><td>Path where the .NET framework is installed. Value should be up to but not including the bin folder. (e.g. C:\installs\microsoft\Microsoft Visual Studio\2019\Community\MSBuild\Current)This folder should have a bin folder with the MSBuild executable (MSBuild.exe).Note: You can use Community or Professional version of Microsoft Visual Studio.</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Project Source Folder</td><td>`FDMSB_INP_PROJECT_SOURCE_FOLDER`</td><td>No</td><td>Path to the project which contains one of the supported MSBuild project files. If a relative path is given, a path inside of the FD\_TEMP\_DIR will be assumed.If value is not provided for this input, FD\_TEMP\_DIR will be assumed.</td></tr><tr><td>Project File Name</td><td>`FDMSB_INP_PROJECT_FILE_NAME`</td><td>No</td><td>MSBuild project file name. The file will be searched in the project source folder if provided, otherwise in the exported source folder in the temp directory will be used.If value is not provided for this input, the plugin searches for files with these extensions, in order: sln, csproj, vbproj, vcxproj, dbproj, fsproj, pyproj, rbproj, wixproj, vdproj, isproj, pssproj, modelproj. Solution files (.sln) are preferred. Visual Studio backup project files (names matching \* - Backup.ext or \* - Backup (n).ext, such as MyApp - Backup.csproj) are skipped during auto-selection. @Since 11.2.0.0If this input is set, that file is used even if it is a Visual Studio backup project file.</td></tr><tr><td>Command Line Arguments</td><td>`FDMSB_INP_CMD_LINE_ARGS`</td><td>No</td><td>The MSBuild.exe arguments or properties, formatted as key=value. Provide one pair per line.When Pass Arguments as Properties is No, multiple arguments are passed to MSBuild.exe space-separated (for example /t:Rebuild /p:Configuration=Release). When Pass Arguments as Properties is Yes, arguments are joined with semicolons inside a single /p: block. @Since 11.2.0.0</td></tr><tr><td>Pass Arguments as Properties</td><td>`FDMSB_INP_PASS_ARGS_AS_PROPERTIES`</td><td>No</td><td>If yes, will prefix /p: before the arguments and join them with semicolons. If no, arguments are passed as separate MSBuild switches, space-separated. @Since 11.2.0.0</td></tr><tr><td>Save Artifacts</td><td>`FDMSB_INP_SAVE_ARTIFACTS`</td><td>No</td><td>Defaults to true. If checked, plugin will save artifacts from this folder in to execution artifacts directory.</td></tr><tr><td>Artifacts Subfolder</td><td>`FDMSB_INP_ARTIFACTS_SUBFOLDER`</td><td>No</td><td>Specify Subfolder under Project Location where artifacts are generated by MSBuild. Defaults to bin.When this input is blank or bin, and Properties/PublishProfiles/FolderProfile.pubxml defines PublishUrl, that publish path is used instead so only deployable publish output is saved. An explicit custom Artifacts Subfolder (other than bin) is always used and the publish profile is ignored. @Since 11.2.0.0Plugin will save artifacts from this folder in to execution artifacts directory if Save Artifacts is checked.The OutDir property offered by MSBuild is used to move the artifacts generated to the user-defined directory.</td></tr><tr><td>Restrict Environment</td><td>`FDMSB_INP_RESTRICT_ENVIRONMENT`</td><td>No</td><td>Provide comma-separated target group codes to restrict environment variables in shell to specified target group codes. If no value is provided all properties are available to shell environment.</td></tr></tbody></table>

# Artifacts 

This operation produces artifacts if the **Save Artifacts** input is checked. Otherwise, you may wish to use the file or shell plugin to move the correct files to the artifacts folder later in the workflow. If you check **Save Artifacts**, then indicate proper **Artifacts Subfolder** as well. When Artifacts Subfolder is left as bin or blank, the plugin prefers the PublishUrl from FolderProfile.pubxml when that file is present.

# Endpoint Selection 

This operation delegates endpoint selection to the workflow developer. The workflow editor will default the selection to "All", which selects all available endpoints associated with the Target. Selecting a specific resource will result in selection of endpoints associated with the Target which have that resource defined.

# Endpoint Execution

This operation delegates endpoint execution to the workflow developer. The workflow editor will default to "Any", which will execute on any one of the selected endpoints, which will be randomly picked from selected endpoints or a specific endpoint where the previous step may have executed. Changing this value to "All" will result in execution on all selected endpoints.
