Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,12 @@ If you are a paying customer, you can contact support via your account.

### How do I set the license key?

You can set the license key when registering AutoMapper:
The simplest way is to set an environment variable (AutoMapper 16.2.0 and later), with no code change needed:

- `AUTOMAPPER_LICENSE_KEY`: the AutoMapper license key.
- `LUCKYPENNY_LICENSE_KEY`: a key shared across Lucky Penny products. It must be for a license that includes AutoMapper.

Or you can set the license key in code when registering AutoMapper, which takes precedence over the environment variables:

```csharp
services.AddAutoMapper(cfg =>
Expand All @@ -91,4 +96,6 @@ services.AddAutoMapper(cfg =>
})
```

See [License configuration](https://docs.automapper.io/en/latest/License-configuration.html) for all the options.

You can register for your license key at [AutoMapper.io](https://automapper.io)
Loading