Using IronXL License Keys
Published: 2022-02-21 08:44:19

---
canonical_url: https://ironsoftware.com/csharp/excel/docs/license/license-keys/
---

## Get Your License Key

IronXL license keys allow you to deploy your project live without any watermark.

[Licenses](https://ironsoftware.com/csharp/excel/licensing/) start at just $499 and include one free year of support and updates.

You can also try IronXL free for 30 days with a [trial license key](https://ironsoftware.com/csharp/excel/docs/license/license-keys/#trial-license).

---

## Step 1: Download the Latest Version of IronXL

The first thing we need to do is install the IronXL.Excel library, adding Excel functionality to the .NET framework.

### Install with Nuget Package
1. In Visual Studio, right-click on the project select "Manage Nuget Packages ..."
2. Search for the IronXL.Excel package and install

Or

1. Enter the Package Manager Console
2. Type > Install-Package IronXL.Excel
 
`PM > Install-Package IronXL.Excel`

[View the package on the NuGet site here](https://www.nuget.org/packages/IronXL.Excel/).

DLL Direct Download Installation
Download the IronXL [.NET Excel DLL](https://ironsoftware.com/csharp/excel/packages/IronXL.zip) and manually install into Visual Studio.

---

## Step 2: Apply Your License Key

### Set the license key inside your code

Add this code to the startup of your application, before IronXL is used.

**C#:**
```
IronXL.License.LicenseKey = "IRONXL-MYLICENSE-KEY-1EF01";
```

**VB:**
```
IronXL.License.LicenseKey = "IRONXL-MYLICENSE-KEY-1EF01"
```

---

### Set your key using Web.Config or App.Config in .NET Framework Applications

To apply a key globally to your application using Web.Config or App.Config, add the following key to your config file in appSettings.

```html
<configuration>
   ....
   <appSettings>
      <add key="IronXL.LicenseKey" value="IronXL-MYLICENSE-KEY-1EF01"/>
   </appSettings>
   ....
</configuration>
```

Ensure that `IronXL.License.IsLicensed` returns `true` to verify.

---

### Set your key using a .NET Core appsettings.json file

To apply a key globally to your application to a .Net Core:

- Add a JSON file to your project called appsettings.json in the root directory of your project
- Add a 'IronXL.LicenseKey' key to your JSON config file. The value should be your license key.
- Ensure that the file properties include _Copy to Output Directory: Copy always_
- Ensure that `IronXL.License.IsLicensed` returns `true` to verify.

File: _appsettings.json_

```json
{

    "IronXL.LicenseKey":"IronXL-MYLICENSE-KEY-1EF01"

}  
```

---

## Step 3: Test your key

Test if your key has been installed correctly.

**C#:**
```
// Check if a given license key string is valid.
bool result = IronXL.License.IsValidLicense("IronXL-MYLICENSE-KEY-1EF01");
// Check if IronXL is licensed successfully 
bool is_licensed = IronXL.License.IsLicensed;
```

**VB:**
```
' Check if a given license key string is valid.
Dim result As Boolean = IronXL.License.IsValidLicense("IronXL-MYLICENSE-KEY-1EF01")
' Check if IronXL is licensed successfully 
Dim is_licensed As Boolean = IronXL.License.IsLicensed
```

_Note_: After adding a license always remember to clean and republish you application to avoid potential mistakes in deployment.

---

## Step 4: Get started with your project

Follow our tutorial on how to [Get Started with IronXL](https://ironsoftware.com/csharp/excel/docs/).

---

## Questions?

If you have any questions, reach out to us at: developers@ironsoftware.com

---

---