# Compiler Error ASPIREEXPORT002

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

> Export ID '{0}' is not a valid method name. Use a valid identifier (e.g., 'addRedis', 'withEnvironment').

This diagnostic error is reported when the export ID specified in an `[AspireExport]` attribute is not a valid identifier. Export IDs are used as method names in generated TypeScript (or other language) code, so they must follow the naming rules for those languages. Specifically, the ID must match the pattern `[a-zA-Z][a-zA-Z0-9.]*`.

## Example

The following code generates `ASPIREEXPORT002`:

```csharp title="C# — Integration.cs"
[AspireExport("add-redis")]  // Hyphens are not allowed
public static IResourceBuilder<RedisResource> AddRedis(
    IResourceBuilder<IResourceWithEnvironment> builder)
{
    return builder.WithReference(...);
}
```

## To correct this error

Use a valid camelCase or dot-separated identifier as the export ID:

```csharp title="C# — Integration.cs"
[AspireExport("addRedis")]
public static IResourceBuilder<RedisResource> AddRedis(
    IResourceBuilder<IResourceWithEnvironment> builder)
{
    return builder.WithReference(...);
}
```