From 403c5811860b5df7280427f2fae2811876021eef Mon Sep 17 00:00:00 2001 From: Jimmy Bogard Date: Fri, 30 Oct 2026 15:07:38 -0500 Subject: [PATCH] Document license key environment variables in the README Closes #4649 Co-Authored-By: Claude Opus 5.5 --- README.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 12c8847c36..c97bbdacce 100644 --- a/README.md +++ b/README.md @@ -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 => @@ -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) \ No newline at end of file