# Compiler Error ASPIREEXPORT003

<Badge
  text="Version introduced: 13.2"
  variant="note"
  size="large"
  class:list={'mb-1'}
/>

> Method '{0}' has return type '{1}' which is not ATS-compatible. Use void, Task, Task&lt;T&gt;, or a supported Aspire type.

This diagnostic error is reported when a method decorated with `[AspireExport]` has a return type that cannot be represented across language boundaries by the Aspire Type Specification (ATS). ATS-compatible return types include `void`, `Task`, `Task<T>` where `T` is ATS-compatible, and supported Aspire types such as `IResourceBuilder<T>`.

## Example

The following code generates `ASPIREEXPORT003`:

```csharp title="C# — Integration.cs"
[AspireExport("getConnectionString")]
public static Func<string> GetConnectionString(
    IResourceBuilder<IResourceWithConnectionString> builder)
{
    return () => builder.Resource.ConnectionStringExpression.ValueExpression;
}
```

## To correct this error

Change the return type to an ATS-compatible type. Use `void`, `Task`, `Task<T>`, or a supported Aspire type such as `IResourceBuilder<T>`:

```csharp title="C# — Integration.cs"
[AspireExport("withEnvironment")]
public static IResourceBuilder<IResourceWithEnvironment> WithEnvironment(
    IResourceBuilder<IResourceWithEnvironment> builder,
    string name,
    string value)
{
    return builder.WithEnvironment(name, value);
}
```