VSSolution

NOTE: Solution generation syntax may be refined slightly in future versions as the capabilities are extended.

Summary

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 // Project(s) to include in Solution .SolutionConfigs // (optional) Solution configurations (see below) .SolutionBuildProject // (optional) Project set to build when "Build Solution" is selected // Folders .SolutionFolders // (optional) Folders to organize projects (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") ] // SolutionFolders - structs in the following format //--------------------------------------------------- [ .Path // Folder path in Solution .Projects // Project(s) to store in this folder ]
Details

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

Basic Options

.SolutionOutput - String - (Required)

The output location of the .sln file.

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

.SolutionProjects - String or ArrayOfStrings - (Required)

The previously defined VCXProject item(s) to include in the solution.

Example:
.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.

Example:
.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.


.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.

Folders

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

Projects within a Solution can be organized into folders.

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

If not specified, all Project files will appear as a flat list in the Solution.

Version Info

.SolutionVisualStudioVersion - String - (Optional)

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

Example:
.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.

Example:

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

.SolutionMinimumVisualStudioVersion = "10.0.40219.1"