# 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 an SDK-style .NET project or file-based C# 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/2d325b13709752ba6d9a943635c5e2940a2530c0/src/Aspire.Hosting.Dotnet/DotnetProjectResource.cs#L41-L45)

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.
