Table of Contents

Class ScriptHost

Namespace
Ando.Scripting
Assembly
ando.dll

Roslyn-based script host for loading and executing build.csando files. Scripts are C# code that registers build steps for later execution.

public class ScriptHost
Inheritance
ScriptHost
Inherited Members

Constructors

ScriptHost(IBuildLogger)

Roslyn-based script host for loading and executing build.csando files. Scripts are C# code that registers build steps for later execution.

public ScriptHost(IBuildLogger logger)

Parameters

logger IBuildLogger

Methods

LoadScriptAsync(string, string)

Loads and executes a build script, returning the configured build context. The script registers steps in the StepRegistry but doesn't execute them.

public Task<BuildContext> LoadScriptAsync(string scriptPath, string rootPath)

Parameters

scriptPath string

Path to the build.csando file.

rootPath string

Project root directory.

Returns

Task<BuildContext>

BuildContext with registered steps ready for execution.

SetActiveProfiles(IEnumerable<string>)

Sets the active profiles from CLI arguments. Call this before LoadScriptAsync to ensure profiles are available.

public void SetActiveProfiles(IEnumerable<string> profiles)

Parameters

profiles IEnumerable<string>

Profile names from CLI (e.g., from -p push,release).

VerifyScriptAsync(string)

Verifies a build script compiles without errors, without executing it. Returns compilation diagnostics if any errors are found.

public Task<List<string>> VerifyScriptAsync(string scriptPath)

Parameters

scriptPath string

Path to the build.csando file.

Returns

Task<List<string>>

List of compilation error messages, empty if script is valid.