# DotnetProjectResource Constructors

- Package: [Aspire.Hosting.Dotnet](/reference/api/csharp/aspire.hosting.dotnet.md)
- Type: [DotnetProjectResource](/reference/api/csharp/aspire.hosting.dotnet/dotnetprojectresource.md)
- Kind: `Constructors`
- Members: `1`

A resource that represents a specified C# project or file-based app added by path.

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

## DotnetProjectResource(string, string)

- Name: `Constructor(string, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/b5f143315ffb6968ea939a9978797a5b20e4c688/src/Aspire.Hosting.Dotnet/DotnetProjectResource.cs#L60-L125)

Initializes a new instance of the [DotnetProjectResource](/reference/api/csharp/aspire.hosting.dotnet/dotnetprojectresource.md) class.

```csharp
public class DotnetProjectResource
{
    public DotnetProjectResource(
        string name,
        string workingDirectory)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource in the application model.
- `workingDirectory` (`string`)
  The working directory for the app, typically the directory containing the project or `.cs` file.
