# Create a Runtime License

## Content

When an application is built on a properly activated development or build machine, the MESCIUS runtime license file is generated and embedded automatically into the application.
Depending on the licensing system used, the runtime license file is created in one of the following formats:

* `.sa3licx`
* `.gclicx`

In some scenarios, you may need to generate the runtime license manually. This typically applies to projects such as **user controls** or **class libraries**, where the runtime license is not generated automatically. A unique runtime license file must be created for each application name.

## Generate a Runtime License Using Visual Studio

To manually generate a runtime license file using the MESCIUS License Manager:

1. Open the application in **Visual Studio** where the license needs to be embedded.
2. From the **Tools** menu, select **MESCIUS > MESCIUS License Manager**.
3. Click **Create Runtime License**.
4. Select the project that requires the license file.
5. Click **Generate**.

After the process is completed, the generated runtime license file (`.sa3licx` or `.gclicx`) is automatically added to the project as an **embedded resource**.

## Generate a Runtime License Using the Command Line

You can also generate a runtime license file using command-line tools, depending on the licensing system.

### MESCIUS License Manager

Use the SA3 client to generate a `.sa3licx` file. The default install path is C:\\ProgramData\\SA3.

```auto
sa3client lc -k "{serial key}" -t "{appName}" -o "{outputFile}"
```

**Parameters:**

* `-k` → Serial Key (if using multiple keys note it as `"key1,key2"`)
* `-t` → Application name (e.g., `"MyApp"`)
* `-o` → Output filename (e.g., `"runtimeLicense.sa3licx"`)

After the process is completed:

* A `.sa3licx` file is generated.
* Add the file to your project (for example, in the **Properties** folder).
* Set the **Build Action** to **EmbeddedResource**.

### GCLM Licensing

Use the `gclm` tool to generate a `.gclicx` file. The default install path is C:\\ProgramData\\GrapeCity\\gclm.
**Windows:**

```auto
gclm.exe "{product id}" -lc {output path}/.gclicx "{app name}"
```

**Linux/Mac:**

```auto
gclm "{product id}" -lc {output path}/.gclicx "{app name}"
```

**Parameters:**

* `product id` → The licensed ComponentOne product ID. If you have a license for Studio Enterprise, use that ID. Find the product ID for your license here: [Activation by Command Line](/componentone/docs/license/online-license/activation/licensing-by-command-line#product-ids)
* `output path` → The output path (e.g., `"C:\Temp\.gclicx"`)
* `-app name` → The calling application name (e.g., `"MyCompany.MyAppName"`)

After the process is completed:

* A `.gclicx` file is generated.
* Add the generated file to your project (e.g., in the **Properties** folder).
* Set the **Build Action** to **EmbeddedResource**.

## Runtime License File Behavior

For both `.sa3licx` and `.gclicx`:

* The runtime license file is generated specifically for the application being built.
* The file must be embedded as a resource in the project.
* Each application requires its own unique runtime license file.

**See Also**

* **[Activation by Command Line.](https://developer.mescius.com/componentone/docs/license/online-license/activation/licensing-by-command-line "https://developer.mescius.com/componentone/docs/license/online-license/activation/licensing-by-command-line")**
* **[License User Controls](https://developer.mescius.com/componentone/docs/license/online-license/common-licensing-scenarios/license-user-controls "https://developer.mescius.com/componentone/docs/license/online-license/common-licensing-scenarios/license-user-controls").**
* **[What is the difference between SA3 and GCLM?](/componentone/docs/license/online-license/faqs#q:-what-is-the-difference-between-sa3-and-gclm?)**