Table of Contents

Class DotnetSdkEnsurer

Namespace
Ando.Utilities
Assembly
ando.dll

Ensures .NET SDK is installed before command execution. Automatically installs the latest SDK version if not present.

public class DotnetSdkEnsurer
Inheritance
DotnetSdkEnsurer
Inherited Members

Constructors

DotnetSdkEnsurer(VersionResolver, Func<ICommandExecutor>, IMessageLogger)

public DotnetSdkEnsurer(VersionResolver versionResolver, Func<ICommandExecutor> executorFactory, IMessageLogger logger)

Parameters

versionResolver VersionResolver
executorFactory Func<ICommandExecutor>
logger IMessageLogger

Properties

IsInstalled

Indicates whether the ensurer has already ensured installation.

public bool IsInstalled { get; }

Property Value

bool

ManualInstallCalled

Indicates whether manual install was called.

public bool ManualInstallCalled { get; }

Property Value

bool

Methods

EnsureInstalledAsync()

Ensures the .NET SDK is installed. Skips installation if already installed or if manual install was called.

public Task EnsureInstalledAsync()

Returns

Task

MarkManualInstallCalled()

Marks that a manual SDK install was called (via Dotnet.SdkInstall()). This disables automatic installation since the user wants a specific version.

public void MarkManualInstallCalled()