Generates a Solution file for use with Visual Studio, allowing integration of FASTBuild into Visual Studio.

VSSolution( 'alias' ) // (optional) Alias { // Basic options .SolutionOutput // Path to Solution file to be generated .SolutionProjects // (optional) Project(s) to include in Solution .SolutionConfigs // (optional) Solution configurations (see below) .SolutionBuildProject // (optional) Project(s) set to build when "Build Solution" is selected // Folders .SolutionFolders // (optional) Folders to organize projects (see below) // Advanced options .SolutionDependencies // (optional) Project dependency information (see below) // Version Info .SolutionVisualStudioVersion // (optional) Version of Solution (default "14.0.22823.1" VS2015 RC) .SolutionMinimumVisualStudioVersion // (optional) Min version of Solution (default "10.0.40219.1" VS2010 Express) } // SolutionConfigs - structs in the following format //--------------------------------------------------- [ .Platform // Platform(s) (default "Win32", "x64") .Config // Config(s) (default "Debug", "Release") .SolutionConfig // (optional) Solution Config .SolutionPlatform // (optional) Solution Platform ] // SolutionFolders - structs in the following format //--------------------------------------------------- [ .Path // Folder path in Solution .Projects // Project(s) to store in this folder ] // SolutionDependencies - structs in the following format //------------------------------------------------------- [ .Projects // Project(s) to specify dependencies for .Dependencies // Project(s) the above projects depend on ]

VSSolution generates a Visual Studio Solution file, referencing Projects generated with VCXProject. It supports organizing the Projects within folders in the Solution. Solutions are compatible with VS 2010 and later.

Basic Options

.SolutionOutput - String - (Required)

The output location of the .sln file.

.SolutionOutput = 'tmp/VisualStudio/MySolution.sln'

.SolutionProjects - String or ArrayOfStrings - (Optional)

The previously defined VCXProject item(s) to include in the solution. Projects will be placed at the root of the Solution, unless a .Folders entry specifies otherwise (see below). Projects which are placed in Solution Folders do not need to be listed in .SolutionProjects.

.SolutionProjects = { 'LibraryA-proj' // Previously defined with VCXProject 'LibraryB-proj' // Previously defined with VCXProject 'Exe-proj' // Previously defined with VCXProject }

.SolutionConfigs - Array of SolutionConfig Structure(s) - (Optional)

The platform/configuration pairs you wish to appear in Visual Studio can be controlled here. They need to match those specified in your generated projects.

.Solution_Config_Debug = [ .Platform = 'Win32' .Config = 'Debug' ] .Solution_Config_Release = [ .Platform = 'Win32' .Config = 'Release' ] .SolutionConfigs = { .Solution_Config_Debug, .Solution_Config_Release }

If not specified, a default matrix of Win32|Debug, Win32|Release, x64|Debug and x64|Release configurations is used.

The optional .SolutionConfig and .SolutionPlatform allow custom solution level Configs and Platforms to be defined. This can be useful when the Config/Platform from the Solution and Project don't have a 1:1 relationship.

.DebugDirectX = [ .Config = 'Debug-DirectX' .Platform = 'Win32' .SolutionConfig = 'Debug' .SolutionPlatform = 'Win32-DirectX' ] .DebugOpenGL = [ .Config = 'Debug-OpenGL' .Platform = 'Win32' .SolutionConfig = 'Debug' .SolutionPlatform = 'Win32-OpenGL' ]

.SolutionBuildProject - String - (Optional)

The root project which will be compiled when a Solution Build is performed.

.SolutionBuildProject = 'Exe-proj'

If not specified, no project will be active in a Solution Build.


.SolutionFolders - Array of SolutionFolder Structure(s) - (Optional)

Projects within a Solution can be organized into folders.

.FolderA = [ .Path = 'Libraries' .Projects = { 'LibraryA-proj', 'LibraryB-proj' } ] .FolderB = [ .Path = 'Executables' .Projects = { 'Exe-proj' } ] .SolutionFolders = { .FolderA, .FolderB }

Projects not associated with folders will appear at the root of the the Solution.


.SolutionDependencies - Array of SolutionDependency Structure(s) - (Optional)

Projects within a Solution can be specified as depending on other projects within the Solution.

For simple solutions, this option is typically not necessary.

For more complex Solutions, specifying artificial SolutionDependencies may be useful (depending on the desired F5 behaviour). For example, in Solutions with multiple executables, only one of the executables should be listed as a .SolutionBuildProject (to prevent mutliple concurrent invocations of FASTBuild). However, (because of what is arguably a bug in Visual Studio) only when this project (the "primary" project) is the active project, will F5 trigger an up-to-date build check on the target automatically before running. If you want this automatic check on other targets (rather than having to manually build the Project or Solution), you have to artifically make any "non-primary" projects depend on the "primary" executable.

.Deps = [ .Projects = { 'Exe1-proj', 'Exe2-proj' } // F5 with either as the active project will perform a Solution Build (via "All") .Dependencies = { 'All-proj' } ] .SolutionDependencies = { .Deps }

Version Info

.SolutionVisualStudioVersion - String - (Optional)

Specify the VisualStudio version that you would like to appear as the generator of this Solution file.

.SolutionVisualStudioVersion = "14.0.22823.1"

If not specified, "14.0.22823.1" will be used (VS2015 RC).

.SolutionMinimumVisualStudioVersion - String - (Optional)

Specify the minimum VisualStudio version necessary toopen this Solution file.

.SolutionMinimumVisualStudioVersion = "10.0.40219.1"

If not specified, "10.0.40219.1" will be used (VS2010 Express).