Share via


SolutionFile Class

Parses a solution file and returns an MSBuild project file containing the projects and dependencies defined in the solution.

Inheritance Hierarchy

System.Object
  Microsoft.Build.Construction.SolutionFile

Namespace:  Microsoft.Build.Construction
Assembly:  Microsoft.Build (in Microsoft.Build.dll)

Syntax

'Declaration
Public NotInheritable Class SolutionFile
public sealed class SolutionFile
public ref class SolutionFile sealed
[<Sealed>]
type SolutionFile =  class end
public final class SolutionFile

The SolutionFile type exposes the following members.

Properties

  Name Description
Public property ProjectsByGuid Gets the collection of projects in this solution, accessible by their GUIDs as strings in "{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}" form
Public property ProjectsInOrder Gets all the projects in this solution, in the order they appeared in the solution file.
Public property SolutionConfigurations Gets all the full solution configurations (configuration + platform) in this solution.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Public method GetDefaultConfigurationName Gets the default configuration name for this solution. Usually it's Debug, unless it's not present, in which case it's the first configuration name we find.
Public method GetDefaultPlatformName Gets the default platform name for this solution. Usually it's Mixed Platforms, unless it's not present, in which case it's the first platform name we find.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Public methodStatic member Parse Parses the projects and project dependencies in the solution file and creates internal data structures representing the projects within the SLN.
Public method ToString (Inherited from Object.)

Top

Remarks

Introduced in Visual Studio 2015.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Build.Construction Namespace