Game.Modding.Toolchain.Dependencies.VsWhereCatalog
Assembly: Game.Modding.Toolchain (inferred)
Namespace: Game.Modding.Toolchain.Dependencies
Type: internal class
Base: System.Object
Summary: Simple plain-old CLR object (POCO) used by the modding toolchain to hold information returned by the vswhere tool. It stores the human-readable product display version and the corresponding build/version string. These values are typically used to detect and compare installed Visual Studio instances when resolving toolchain dependencies.
Fields
-
public string productDisplayVersion = string.Empty;
Human-readable product/version string reported by vswhere (for example "Visual Studio 2022"). Defaults to an empty string. -
public string buildVersion = string.Empty
Machine/build version reported by vswhere (for example "17.4.33225.371"). Defaults to an empty string.
Properties
- None. This class exposes plain public fields rather than properties.
Constructors
public VsWhereCatalog()
The default parameterless constructor is provided implicitly. It initializes the two string fields to empty strings.
Methods
- None. This is a simple data container with no behavior.
Usage Example
// Direct usage:
var catalog = new VsWhereCatalog();
catalog.productDisplayVersion = "Visual Studio 2022";
catalog.buildVersion = "17.4.33225.371";
Console.WriteLine($"Detected VS: {catalog.productDisplayVersion} ({catalog.buildVersion})");
// Or when deserializing JSON output from vswhere (example using Newtonsoft.Json):
// string json = /* JSON returned by vswhere for a single instance */;
var catalogFromJson = Newtonsoft.Json.JsonConvert.DeserializeObject<VsWhereCatalog>(json);
Console.WriteLine($"Detected VS: {catalogFromJson.productDisplayVersion} ({catalogFromJson.buildVersion})");