# DotnetProjectHostingExtensions

- Kind: `class`
- Package: [Aspire.Hosting.Dotnet](/reference/api/csharp/aspire.hosting.dotnet.md)
- Version: `13.5.3-preview.1.26425.3`
- Namespace: `Aspire.Hosting`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/b5f143315ffb6968ea939a9978797a5b20e4c688/src/Aspire.Hosting.Dotnet/DotnetProjectHostingExtensions.cs)

Provides extension methods for adding C# projects and file-based C# apps (by path) to an `Hosting.IDistributedApplicationBuilder`.

## Definition

```csharp
namespace Aspire.Hosting;

public static class DotnetProjectHostingExtensions
{
    // ...
}
```

## Methods

- [AddDotnetProject(IDistributedApplicationBuilder, string, string)](/reference/api/csharp/aspire.hosting.dotnet/dotnetprojecthostingextensions/methods.md#adddotnetproject-idistributedapplicationbuilder-string-string) : `IResourceBuilder<DotnetProjectResource>` `extension` `experimental` `ats ignored` -- Adds a C# project or file-based app to the application model.
- [AddDotnetProject(IDistributedApplicationBuilder, string, string, Action<ProjectResourceOptions>)](/reference/api/csharp/aspire.hosting.dotnet/dotnetprojecthostingextensions/methods.md#adddotnetproject-idistributedapplicationbuilder-string-string-action-projectresourceoptions) : `IResourceBuilder<DotnetProjectResource>` `extension` `experimental` `ats ignored` -- Adds a C# project or file-based app to the application model.
