Open sandboxFocus

Method Reload

Reload(bool, CancellationToken)

Synchronously reloads all projects in the current workspace.

Declaration
public Workspace Reload(bool restore = true, CancellationToken cancellationToken = default)
Parameters
Type Name Description
bool restore

Indicates whether to run dotnet restore before loading projects. The default is true.

CancellationToken cancellationToken

A cancellation token.

Returns
Type Description
Workspace

The current workspace instance after reloading.

See Also