GetProject(string, string?)
Gets a project by name and optionally by target framework.
Declaration
public Project GetProject(string name, string? targetFramework = null)Parameters
| Type | Name | Description |
|---|---|---|
| string | name | The project name (without extension). |
| string | targetFramework | The target framework, or |
Returns
| Type | Description |
|---|---|
| Project | The matching project. |
Exceptions
| Type | Condition |
|---|---|
| KeyNotFoundException | Thrown when no project with the specified name is found. |
| InvalidOperationException | Thrown when multiple projects match and no target framework is specified. |