This action provides the ability to build Visual Studio .NET solutions using FinalBuilder. You can choose to build, rebuild or clean the whole solution or selected projects in the solution. You can also choose which Solution Configuration to use.
Solution
Solution File
The path to the solution file to build. If the solution file is found at design-time, the configuration and project lists will be automatically populated.
Click the refresh button (as shown) to reload the solution and refresh the configuration, version and project names.
Configuration
Choose the solution configuration to build. Available configurations are automatically loaded from the solution file and shown in the dropdown list.
If the solution file cannot be found, the dropdown shows the default Visual Studio.NET configurations.
Use RegEx in config name
Fail action if no configurations match
VS.NET Version
Specify the version of Visual Studio to build the solution. A solution file can only be built by the version of Visual Studio that created it.
The correct version is automatically chosen in the solution file is loaded at design-time.
Auto select version from solution
Action
Action
Choose the action (Build, Rebuild, Clean or Deploy) to perform. These are all the equivalent of taking the same action in the Visual Studio IDE.
Use MSBuild
Solution files created by Visual Studio 2005 and newer can be built by MSBuild. Check the "Use MSBuild" checkbox to build with MSBuild instead of Visual Studio. If you enable this option, you do not need Visual Studio installed on the build machine. Choosing this option also enables a lot of the custom properties of the action, and allows you to set Unloaded Projects (see below for details.)
Apply To Project
You can choose to build all projects in a solution, or only build certain projects.
All Enabled Projects
Selecting this option will build the chosen configuration, as defined in the Configuration Manager in Visual Studio. Only projects with the "Build" flag set in Configuration Manager will be built.
All Projects in Solution
Selecting this option means that every single project in the solution will be built, regardless of whether or not it is set to "Build" as part of the selected configuration.
Selected Projects
Selecting this option allows you to choose which projects to build, using the listbox shown to the right of the option. Only checked projects will be built.
See Unloaded Projects (see below for details.)
Paths
(The options on this page are only available when the "Use MSBuild" option is enabled.)
Build Output
Output Directory
Enter an output directory here to override the default output directory for each project in the solution. If this field is left blank, the default output directory will be used.
Reference Paths
If the "Override project Reference Paths" option is enabled, this list of paths will be used to resolve search for assembly references. This list overrides the list of paths set on the "Reference Paths" tab for a Visual Studio project (this list is normally stored in each project's .user file.)
(Apart from "Use Environment Variables...", all of the options on this page are only available when "Use MSBuild" is enabled.)
Build
Advanced Build Options
Use Environment Variables for C++ Paths
When building Visual C++ projects, enabling this option will use the environment variable values PATH, INCLUDE, LIBS, and LIBPATH when starting Visual Studio. This is equivalent to passing the /useenv option to Visual Studio, or the /p:useenv=1 argument to MSBuild.
Log Detail Level
Specify the level of output detail you would like to see in the log. Minimal will only show basic compilation steps. Normal shows all major targets. Detailed and Diagnostic can be used to analyse complex build scenarios.
Max CPUs
This option is only enabled when Visual Studio 2008 is being used for the build. You can limit the maximum number of CPUs to use for building, or set it to "All Available" to use all available CPUs.
Override configuration settings
Override compiler settings
If this checkbox is selected, then all of the following configuration properties will be overriden:
Compile Constants
Specify conditional constants to define. Separate multiple constants with semicolons.
DEBUG & TRACE
Check these boxes to specifically enable these two constants.
Optimize Code
Check this box to enable code optimization.
Allow unsafe code
Check this box to allow unsafe code.
Override Warning settings
If this checkbox is selected, then all of the following Warning-related properties will be overriden:
Warning Level
Specify the level of warning output to display.
Treat All Warnings as Errors
If this option is enabled, any compiler warning will cause the build to fail.
Treat Specified Warnings as Errors
Specify one or more warning numbers to treat as errors. Separate multiple warning numbers with semicolons.
Disable These Warnings
Specify one or more warning numbers to completely ignore. Separate multiple warning numbers with semicolons.
Override Target Framework
This option is only enabled when using Visual Studio 2008. It allows you to build projects against an earlier version of the .NET Framework.
.NET Version
The .NET Version page allows the action to update AssemblyInfo files in all or selected .NET projects in the solution. This will not work for any ASP.NET Web Sites in the solution.
Specify the details that you would like to set. The "Use PropertySet for Version Info" dropdown allows you to use a dedicated topic.)
The Win32 Version page allows the action to update .RC files in all or selected C++ projects in the solution.
Specify the details that you would like to set. The "Use PropertySet for Version Info" dropdown allows you to use a dedicated topic.)
Update assembly info for .NET projects
Use property set for version info
Title
Description
Company
Product
Copyright
Trademark
Link file version to assembly version
Assembly version
Major
Minor
Build
Release
Auto increment build
Auto increment revision
File version
Major
Minor
Build
Release
Auto increment build
Auto increment revision
Apply to
All projects in solution
Selected projects
Version Info
Update version information in project
Whether the linker should include version information into the generated binary or not.
Use Property Set for Version Info
Whether to use a Property Set for the version information of the generated binary or not.
Module version number
Major version
The major version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
Minor version
The minor version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
Release
The release version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
Build
The build version number of the generated binary. Can be set directly, or taken from a supplied Property Set.
Auto-increment build number
Whether to automatically increase the build number portion of the Module Version Number or not. If the number is increased the value is updated into the action. The project will need to be saved so that this persists for the next execution.
Module Attributes
A binary can be marked with a number of different attributes. These are namely
Debug build
Special build
DLL
Pre-release
Private build
Language
The primary language of the binary.
Code Page
Determines the default text character set that is used in ANSI source code. This is used by the compiler in working out how to parse multibyte character strings. This typically includes;
- String constants
- Comments
- #error directive
- #define directive
Locale ID
The locale ID which relates to the code page selected.
Version Information
All the version information which will be attached to the binary when its generated. These can either be sourced from the Project Settings, Property Set, or set directly in the dialog.
Include Compile Date in Version Info
Where to update the version information to have the date of the action run included into the version information as the compile date.
Auto-Update FileVersion String
Whether to automatically update the FileVersion string based on the FileVersion major, minor, release, and build numbers.
Link ProductVersion to FileVersion
Whether to link the ProductVersion file in the version information to the FileVersion field. Typically used if the product has only one version number across all parts of the build.
Auto-Update ProductVersion String
Whether to automatically update the ProductVersion string based on the ProductVersion major, minor, release, and build numbers.
Apply to Project
All Projects
Selected Projects
Project Detection
Use WMI - specify website number
Use network share - specify share name
Use WebDAV
Username
Password
Scripting
In addition to the common scripting properties, this action supports 3 additional script functions
Action.GetProjectID
This function takes the path to a project file, or the name of a project, and returns the internal ID (GUID) for that project. If the project is not found in the current solution, the function returns an empty string. Paths can be absolute, or relative to the solution file.
Action.GetProjectName
This function takes the ID of a project inside the solution, and returns the name (as shown in the Visual Studio IDE.) If the project ID is not found in the current solution, the function returns an empty string.
Action.GetProjectPath
This function takes the ID of a project inside the solution, and returns the project file path (relative to the solution directory.) If the project ID is not found in the current solution, the function returns an empty string.
Dynamically Choosing Which Projects to Build at Runtime
It is possible to dynamically configure the list of projects to build at runtime, using the Action.SelectedProjects property. This property is a variable "MyProjects", which contains a list of project names or paths, it is possible to use script like this in the BeforeAction event of the action:
Action.SelectedProjects = FBVariables.MyProjects;
Names are automatically converted to project IDs when the value is set. If the name does not represent a valid project, the entry is not added
Solutions Which Contain Unloaded Projects
It is possible to unload a project in Visual Studio by right-clicking in Solution Explorer and selecting "Unload Project". Unloaded projects build differently, depending on if you have chosen "Use MSBuild" or not.
With "Use MSBuild" enabled, unloaded projects behave exactly the same as loaded projects. If you choose to build "All Projects", then all projects (including unloaded projects) will build. If you choose to build "Selected Projects", then all the selected projects will build.
Without "Use MSBuild" enabled, unloaded projects will never be built, even if they are explicitly selected.
Extra MSBuild Properties
It is possible to pass custom MSBuild Properties to the build process when "Use MSBuild" is selected. This allows you to set build properties which are not supported natively by the action.
To set these properties, select the action and click on the Properties tab. Under the MSBuild section is a property called "Extra MSBuild Properties":
Click the ellipsis button to edit the list of extra properties. Place each property on a new line. Properties take the form <Name>=<Value>.