# MauiProjectResource Constructors

- Package: [Aspire.Hosting.Maui](/reference/api/csharp/aspire.hosting.maui.md)
- Type: [MauiProjectResource](/reference/api/csharp/aspire.hosting.maui/mauiprojectresource.md)
- Kind: `Constructors`
- Members: `1`

Represents a .NET MAUI project resource in the distributed application model.

## MauiProjectResource(string, string)

- Name: `Constructor(string, string)`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Maui/MauiProjectResource.cs#L21-L26)

Represents a .NET MAUI project resource in the distributed application model.

```csharp
public class MauiProjectResource
{
    public MauiProjectResource(
        string name,
        string projectPath)
    {
        // ...
    }
}
```

## Parameters

- `name` (`string`)
  The name of the resource.
- `projectPath` (`string`)
  The path to the .NET MAUI project file.

## Remarks

This resource serves as a parent for platform-specific MAUI resources (Windows, Android, iOS, macOS). Use extension methods like `AddWindowsDevice` or `AddMacCatalystDevice` to add platform-specific instances.

MAUI projects are built on-demand when the platform-specific resource is started, avoiding long AppHost startup times while still allowing incremental builds during development.
