# Aspire.Hosting.Dotnet

- Module: `Aspire.Hosting.Dotnet`
- Version: `17.0.0`
- Import path: `apphost/modules/aspire`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)
- Functions: `5`
- Types: `2`

## Handles

- [DotnetProjectResource](/reference/api/go/aspire.hosting.dotnet/dotnetprojectresource.md) -- `handle` - 4 members -- A resource that represents an SDK-style .NET project or file-based C# app added by path.

## DTOs

- [DotnetProjectOptions](/reference/api/go/aspire.hosting.dotnet/dotnetprojectoptions.md) -- `struct` - 3 fields -- Launch options for a .NET project in a polyglot AppHost.

## Functions

- [AddDotnetProject](/reference/api/go/aspire.hosting.dotnet/adddotnetproject.md) -- `method` - on `DistributedApplicationBuilder` -- Adds a .NET application resource.
- [DisableForwardedHeaders](/reference/api/go/aspire.hosting.dotnet/disableforwardedheaders.md) -- `method` - on `DotnetProjectResource` -- Disables automatic forwarded-header configuration when publishing the .NET project.
- [WithBuildEnvironment](/reference/api/go/aspire.hosting.dotnet/withbuildenvironment.md) -- `method` - on `DotnetProjectResource` -- Adds an environment variable to the build process for a .NET project.
- [WithEndpointsInEnvironment](/reference/api/go/aspire.hosting.dotnet/withendpointsinenvironment.md) -- `method` - on `DotnetProjectResource` -- Configures endpoint environment-variable injection for a .NET project in polyglot AppHosts.
- [WithReplicas](/reference/api/go/aspire.hosting.dotnet/withreplicas.md) -- `method` - on `DotnetProjectResource` -- Configures the number of replicas of the .NET project.
