Skip to content

Game.Modding.Toolchain.Dependencies.VsWhereResult

Assembly:
(assembly not specified — internal to the game's modding/toolchain code)

Namespace: Game.Modding.Toolchain.Dependencies

Type: internal class

Base: System.Object

Summary:
Represents the top-level result object returned by the vswhere tool (or by a JSON output produced from it). This class contains an array of VsWhereEntry objects (one per discovered Visual Studio installation). It provides a convenience method to deserialize such JSON using the game's Colossal.Json utilities.


Fields

  • public VsWhereEntry[] entries
    Holds the list of installation entries returned by vswhere. Each element is expected to be a VsWhereEntry (defined elsewhere in the dependencies). The field is public and mutable, and may be null if the JSON does not contain an "entries" array.

Properties

  • This class defines no properties.

Constructors

  • public VsWhereResult() (implicit/default)
    No explicit constructor is declared in source; the default parameterless constructor is provided by the runtime.

Methods

  • public static VsWhereResult FromJson(string json)
    Parses the provided JSON string into a VsWhereResult instance using Colossal.Json. Internally it calls JSON.Load(json) to parse the JSON text and JSON.MakeInto(...) to convert the parsed JSON into the VsWhereResult object graph. Use this to create a VsWhereResult from raw vswhere JSON output.

Usage Example

// Example: parse vswhere JSON output into a VsWhereResult
string json = System.IO.File.ReadAllText("vswhere_output.json");
Game.Modding.Toolchain.Dependencies.VsWhereResult result = 
    Game.Modding.Toolchain.Dependencies.VsWhereResult.FromJson(json);

if (result?.entries != null)
{
    foreach (var entry in result.entries)
    {
        // VsWhereEntry fields can be inspected here (e.g., instanceId, installationPath, etc.)
        // (Depends on the VsWhereEntry class definition)
    }
}

Additional notes: - The class is marked internal so it is intended for use inside the same assembly (toolchain/dependencies area). - The JSON deserialization relies on the Colossal.Json utilities included with the game's codebase; ensure those are available when invoking FromJson.