LoadAsync(params string[])
Asynchronously loads a set of projects or solutions into a Workspace, or returns an existing workspace if the method has been previously called with the exact same parameters.
Declaration
public Task<Workspace> LoadAsync(params string[] paths)Parameters
| Type | Name | Description |
|---|---|---|
| string[] | paths | A list of project or solution paths. |
Returns
| Type | Description |
|---|---|
| Task<Workspace> | A Workspace where all specified projects or solutions, and their dependencies, have been loaded. |
See Also
LoadAsync(ImmutableArray<string>, ImmutableDictionary<string, string>?, bool, CancellationToken)
Asynchronously loads a set of projects or solutions into a Workspace, or returns an existing workspace if the method has been previously called with the exact same parameters. This overload allows specifying MSBuild properties.
Declaration
public Task<Workspace> LoadAsync(ImmutableArray<string> paths, ImmutableDictionary<string, string>? properties = null, bool restore = true, CancellationToken cancellationToken = default)Parameters
| Type | Name | Description |
|---|---|---|
| ImmutableArray<string> | paths | A list of project or solution paths. |
| ImmutableDictionary<string, string> | properties | MSBuild properties to pass to the projects, or |
| bool | restore | Indicates whether to run |
| CancellationToken | cancellationToken | A cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<Workspace> | A Workspace where all specified projects or solutions, and their dependencies, have been loaded. |