Amplication AST Libraries Documentation
    Preparing search index...

    Represents a Visual Studio solution file in the AST. This class handles the generation and parsing of .sln files, including project references, configurations, and solution-wide settings.

    Hierarchy (View Summary)

    Index

    Constructors

    Methods

    • Parses an existing solution file and loads metadata, projects, configurations, and dependencies.

      Parameters

      • content: string

        The content of the solution file to parse

      Returns void

    • Adds a new project to the solution.

      Parameters

      • name: string

        The name of the project

      • path: string

        The relative path to the project file

      • typeGUID: string

        The GUID identifying the project type

      • projectGUID: string

        The unique GUID for this project

      • dependencies: string[] = []

        Array of project GUIDs that this project depends on

      Returns string

      The GUID of the added project

    • Removes a project from the solution. This also removes the project's configurations and dependencies.

      Parameters

      • name: string

        The name of the project to remove

      Returns void

    • Generates the updated .sln file content. This method writes the solution file in the standard Visual Studio format, including all projects, configurations, and dependencies.

      Parameters

      • writer: Writer

        The writer to write to

      Returns void

    • Returns the string representation of the AST node. This method creates a new Writer instance and writes the node's content to it.

      Returns string

      The string representation of the AST node