# AspireExportAttribute Properties

- Package: [Aspire.Hosting](/reference/api/csharp/aspire.hosting.md)
- Type: [AspireExportAttribute](/reference/api/csharp/aspire.hosting/aspireexportattribute.md)
- Kind: `Properties`
- Members: `7`

Marks a method, type, or assembly-level type as an ATS (Aspire Type System) export.

## Description

- Name: `Description`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets a compatibility description for this export.

```csharp
public string? Description { get; set; }
```

## Remarks

XML documentation is the primary source for generated polyglot SDK API documentation. Use `ats-summary` and related ATS XML documentation tags for new exports.

## ExposeMethods

- Name: `ExposeMethods`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether to expose public instance methods of this type as ATS capabilities.

```csharp
public bool ExposeMethods { get; set; }
```

## Remarks

When true, the type's public instance methods are automatically exposed as capabilities (unless marked with [AspireExportIgnoreAttribute](/reference/api/csharp/aspire.hosting/aspireexportignoreattribute.md)).

Method capabilities are named as `{Package}/{TypeName}.{methodName}` (camelCase method name). The first parameter of the capability will be a handle to the instance.

## ExposeProperties

- Name: `ExposeProperties`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether to expose properties of this type as ATS capabilities.

```csharp
public bool ExposeProperties { get; set; }
```

## Remarks

When true, the type's public instance properties that return ATS-compatible types are automatically exposed as get/set capabilities (unless marked with [AspireExportIgnoreAttribute](/reference/api/csharp/aspire.hosting/aspireexportignoreattribute.md)).

Use this for context types passed to callbacks (like `EnvironmentCallbackContext`) that provide access to runtime state.

Property capabilities are named as:

- `{Package}/{TypeName}.{propertyName}` for getters (camelCase property name)
- `{Package}/{TypeName}.set{PropertyName}` for setters (writable properties only)

## Id

- Name: `Id`
- Modifiers: `nullable` `get`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs#L149)

Gets the method name for capability exports.

```csharp
public string? Id { get; }
```

## Remarks

The full capability ID is computed as `{AssemblyName}/{Id}`.

This is null for type exports.

## MethodName

- Name: `MethodName`
- Modifiers: `nullable` `get; set`
- Returns: `string?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets the method name to use in generated polyglot SDKs.

```csharp
public string? MethodName { get; set; }
```

## Remarks

When not specified, the method name from [AspireExportAttribute.Id](/reference/api/csharp/aspire.hosting/aspireexportattribute/properties.md#id) is used directly.

Use this property to override the generated name when disambiguation is needed (e.g., to avoid collisions with another integration's method of the same name). Each language generator will apply its own formatting convention (camelCase for TypeScript, snake_case for Python, etc.).

## RunSyncOnBackgroundThread

- Name: `RunSyncOnBackgroundThread`
- Modifiers: `get; set`
- Returns: `bool`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets whether the exported method invocation should run on a background thread by the ATS dispatcher.

```csharp
public bool RunSyncOnBackgroundThread { get; set; }
```

## Remarks

Set this to `true` for exports that may invoke synchronous callback delegates which in turn re-enter the remote host through ATS. Running the export on a background thread allows the JSON-RPC request loop to continue processing nested callback and capability invocations while the method waits for the callback to complete.

For async exports, this applies to the synchronous invocation path that returns the `Tasks.Task`, `Tasks.Task`1`, `Tasks.ValueTask`, or `Tasks.ValueTask`1`. This is important when the async method performs startup work or invokes callbacks before its first asynchronous yield.

When applied to a type, this setting also applies to exported members discovered from that type unless an individual member overrides it.

## Type

- Name: `Type`
- Modifiers: `nullable` `get; set`
- Returns: `Type?`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/a3766e994fd2cba86c8ac60b8a80268cab7e6383/src/Aspire.Hosting/Ats/AspireExportAttribute.cs)

Gets or sets the CLR type for assembly-level type exports.

```csharp
public Type? Type { get; set; }
```

## Remarks

Use this at assembly level to export types you don't own to ATS.
