Documentation
Table of Contents

Development and production

The library sees only your key and FailWhenUnlicensed. It cannot tell development from production: what a use is allowed to be is set by the license and the commercial license guide, and the notice is how the library reports the key it found. This page gives the settings of two configurations and the notice each one produces.

Each notice is logged with event id 9100 when the client is built, through the client's logger, or to System.Diagnostics.Trace when the client has no logger factory. A result carries it in Warnings, after "License: ", as License behaviour describes. Text in angle brackets comes from the key.

Development Licensed production
Key None, or the evaluation key, in INTENTSHARP_LICENSE_KEY The paid key, from a secret store
FailWhenUnlicensed false, the default true when a deployment that lost its key must not start
State None, or Evaluation and then EvaluationExpired Licensed, then RenewalDue and Lapsed
Notice A Warning, repeated hourly; or Information, once Information, once, when the client is built

Development

Evaluation is for the developer's own testing and prototyping. Anything that serves other people, a pilot included, is production use under the license and needs a commercial license. An extended evaluation is granted only in writing: licensing@c2consultants.net.

The settings: no key at all, or the evaluation key the evaluation form emailed, in the INTENTSHARP_LICENSE_KEY environment variable so it stays out of source control. FailWhenUnlicensed stays false, its default. In bash:

export INTENTSHARP_LICENSE_KEY="YOUR-EVALUATION-KEY"

In PowerShell:

$env:INTENTSHARP_LICENSE_KEY = "YOUR-EVALUATION-KEY"

With no key the state is None. The notice is a Warning when the client is built, repeated at most once an hour while the client is used, on the client's first result and on the result of each call that repeated it. A client built with no key reports:

State: None
Notice: No IntentSharp license key is configured. IntentSharp keeps working; nothing is disabled. Free for a 30-day evaluation outside production, for personal use not for a business, for educational use. After 30 days any use by or for a business, and any production or commercial use, requires a paid license. To buy a license, email licensing@c2consultants.net with your company name, the edition you need and the number of developers, or see https://intentsharp.com/pricing. Set the key in IntentClientOptions.LicenseKey (IntentClientBuilder.WithLicenseKey), in the IntentSharp:Options:LicenseKey configuration value, or in the INTENTSHARP_LICENSE_KEY environment variable.

With an evaluation key the state is Evaluation: one Information line when the client is built, and the same text on the client's first result only, never repeated:

IntentSharp evaluation key for <licensee> (license <id>): <n> days remaining; the evaluation runs through <yyyy-MM-dd>. An evaluation does not cover production use. To buy a license, email licensing@c2consultants.net with your company name, the edition you need and the number of developers, or see https://intentsharp.com/pricing.

After the key's last day the state is EvaluationExpired: an Error when the client is built and hourly, and on results the same way as None. The client still works, and the notice begins "The IntentSharp evaluation for", followed by the licensee, the license id and the last day, and "evaluation ended, purchase required."

Read client.License at startup to see which state you are in:

// What the license check found when the client was built. It never calls the network.
LicenseStatus license = client.License;
Console.WriteLine($"License: {license.State}");   // Licensed, Evaluation, None, ...
if (license.DaysRemaining is int days)
    Console.WriteLine($"Days remaining: {days}");
if (license.Message is { Length: > 0 } message)
    Console.WriteLine(message);                    // what to do, when there is something to do

Licensed production

The settings: the paid key in IntentSharp:Options:LicenseKey from a secret store (user secrets in development, a vault or the host's secret settings in production), or in the INTENTSHARP_LICENSE_KEY environment variable, and never in source control. Set FailWhenUnlicensed to true (IntentSharp:Options:FailWhenUnlicensed) when a deployment that lost its key must not start rather than run with a notice. In appsettings.json, with the key itself in the secret store:

{
  "IntentSharp": {
    "Options": {
      "FailWhenUnlicensed": true
    }
  }
}
// Reads the "IntentSharp" section, including IntentSharp:Options:LicenseKey.
services.AddIntentSharp(configuration);

Your license key shows every place the key can come from. With a valid paid key the state is Licensed: one Information line when the client is built, no notice on any result and no reminder. "Updates through" is your key's maintenance date:

IntentSharp is licensed to <licensee>, <edition> edition, <seats> (license <id>), paid through <yyyy-MM-dd>, updates through <yyyy-MM-dd>.

In the 30 days after the paid-through date the state is RenewalDue (a Warning, hourly and on results), and after them Lapsed (an Error, hourly and on results); neither stops a client. A release dated after the key's maintenance date refuses the key: Build() throws LicenseException and no client is built (What the release date check does and does not do). A key that does not verify, copied with a change or not issued by C2Consultants, is Invalid: an Error when the client is built and hourly, naming the problem, and the client works. With FailWhenUnlicensed set, a missing or invalid key and an ended evaluation throw at Build() instead. The same settings with the key missing:

LicenseException.State: None
Message: No IntentSharp license key is configured. Free for a 30-day evaluation outside production, for personal use not for a business, for educational use. After 30 days any use by or for a business, and any production or commercial use, requires a paid license. To buy a license, email licensing@c2consultants.net with your company name, the edition you need and the number of developers, or see https://intentsharp.com/pricing. Set the key in IntentClientOptions.LicenseKey (IntentClientBuilder.WithLicenseKey), in the IntentSharp:Options:LicenseKey configuration value, or in the INTENTSHARP_LICENSE_KEY environment variable. IntentClientOptions.FailWhenUnlicensed is set, so the client was not built.

The messages of the other states, and what to do about each, are on License problems.