# ProjectBuildTarget Constructors

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [ProjectBuildTarget](/reference/api/csharp/aspire.hosting/projectbuildtarget.md)
- Kind: `Constructors`
- Members: `1`

Identifies the project output produced by an externally coordinated build.

<a id="constructor"></a>
<a id="constructor-string-bool"></a>

## ProjectBuildTarget(string, bool)

- Name: `Constructor(string, bool)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting/ProjectBuildTarget.cs#L24-L29)

Initializes a new instance of the [ProjectBuildTarget](/reference/api/csharp/aspire.hosting/projectbuildtarget.md) class.

```csharp
public sealed class ProjectBuildTarget
{
    public ProjectBuildTarget(
        string targetPath,
        bool useAppHost)
    {
        // ...
    }
}
```

## Parameters

- `targetPath` (`string`)
  The fully-qualified MSBuild `TargetPath`.
- `useAppHost` (`bool`)
  A value indicating whether the project output includes an apphost executable that launches `targetPath`.

## Exceptions

- `ArgumentNullException` -- `targetPath` is null.
- `ArgumentException` -- `targetPath` is empty or consists only of white-space characters.
