Registering Production License Keys

This article describes license types and how you can register a production license key. If you want to evaluate Graphics Mill before you purchase a license, you can generate a trial license key as described in the Evaluating Graphics Mill topic.

There are several ways to register a production license key for Graphics Mill:

  1. You can register a license key on a development computer or a production server using the Graphics Mill License Manager . This tool requires Internet access for the machine where the key is registered.
  2. If you experience problems with your Internet connection or have strict firewall settings, you can apply a license key by updating the Windows Registry manually.
  3. You can register a license key using the LIC file on a production or development web server.
  4. On a development computer, you can embed a license key inside a desktop application that has a reference to Graphics Mill binaries using the License.licx file.
  5. On a development computer, you can set a license key in the source code of your application.
  6. On a development web server, you can set a license key in the application's web.config file.

License Types in Graphics Mill 10

Starting from version 10, Graphics Mill works with the following license types:

  • Evaluation is a free license for a 30-day evaluation period.
  • Developer determines the number of developers allowed to work with Graphics Mill at the same time.
  • Developer, Desktop Application is bound to hardware and an application name, and can be used for distributing royalty-free Windows-based desktop applications. To generate such a license, you need to specify your activation code (for example, XPNlkfesMg3ZuPRhAhjseQ==) and application name (for example, ImageViewer.exe). If this license type is unavailable in your account, you can contact our support team.
  • Server Application allows you to install Graphics Mill on a server. This license requires you to specify your activation code.
  • Enterprise Application has a custom licensing policy and is not generally available.

Editions

For server licenses, Graphics Mill is available in two editions: Standard and Professional. The Professional edition includes the Standard edition's features, but additionally supports reading PSD (Photoshop) files.

Activation codes

Activation codes are generated based on hardware parameters in the Graphics Mill License Manager.

Obtaining a license key based on your activation code.

You can activate this code and get your license key in your Graphics Mill account. After you paste your key and press Proceed, you can verify the license type and maintenance period.

Verifying a license key.

License Key Formats

Starting from Graphics Mill 10, license keys have the following format:

gm.std.dev.max:5.maint:2018-01-01_QJ8Zbs68BtSXG6a2/AFlXY65LWC//WUfX5yv8NJmaHiIZbgwKWhpn3+GdWcFZ1h3fjRmIM3ZKwH2sqQ2pCYilpACFuFFOiuUpJJIaw6fEzbmEEuZnVlkfpRd450HChjddA==

You may notice that such a key contains license parameters in its prefix.

License keys of earlier versions look as follows:

80FF0-020B2-99F10-00074-942DF-5E924B

Using Graphics Mill License Manager

Graphics Mill License Manager is intended to register license keys on developer machines and target web servers. This tool is distributed along with Graphics Mill:

  • If you downloaded Graphics Mill from www.graphicsmill.com, find the License Manager in the Graphics Mill installation folder - Aurigma\Graphics Mill 10 SDK\LicenseManager.
  • If you downloaded Graphics Mill as a NuGet package, launch the License Manager located in the packages of the project solution - packages\Aurigma.GraphicsMill.Core.x86.10.x.x\tools\LicenseManager.

After launching the License Manager, you will see the following dialog:

Registering a new user.

If you have not yet registered on www.graphicsmill.com, enter your name, company, and email on the New user tab. If you have been registered on www.graphicsmill.com, open the Existing user tab and enter your email and password.

Obtaining your generated license.

After you press the Proceed button, you will be redirected to a page at www.graphicsmill.com stating your license key and its expiry date. The tool retrieves a production key from your account and registers it in your system. If a trial license key cannot be obtained or registered for some reason, please contact our support team.

Updating the Windows Registry Manually

If by whatever reason you cannot register license keys using Graphics Mill License Manager, you can apply a license key by updating the Windows Registry manually. To perform this, download your license key from My Licenses & Downloads and create the .reg file or update the following keys of the Windows Registry, depending on your Graphics Mill version:

  • Starting from Graphics Mill 10:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Aurigma\Graphics Mill for .NET\10.0] 
    "License Key"="YOUR_KEY"   
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Aurigma\Graphics Mill for .NET\10.0] 
    "License Key"="YOUR_KEY"
  • Earlier versions:
    [HKEY_LOCAL_MACHINE\SOFTWARE\Aurigma\Graphics Mill for .NET\6.0] 
    "License Key"="YOUR_KEY"   
    [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Aurigma\Graphics Mill for .NET\6.0] 
    "License Key"="YOUR_KEY"

Also, you can download the .reg file from the following link: Register License Key Offline.

Using a LIC File

If you deploy a web application on a server where you have no permission to patch the registry, you can register a production key using a LIC file.

Important

If you develop a desktop application, do not include a production license key in the end product using a LIC file! Instead, register Graphics Mill at the development machine only and embed a license key into application resources. This approach is described in the Using Licenses.licx File section of this article.

  1. Create a new text file named Aurigma.GraphicsMill.lic.
  2. Insert your license key into this file. Make sure that this file has no extra characters, such as white spaces, etc.
  3. Copy this file into the \bin folder of your web application.

Using the Licenses.licx File

This approach is intended for desktop applications and requires a Developer, Desktop Applications license. You should apply all the steps described in this section on the development machine only. After you execute these instructions correctly, a production license key will be imported into the resources of your application. Therefore you do not need to register Graphics Mill on the customers' workstations.

  1. Register Graphics Mill using the Graphics Mill License Manager on the development machine as described in the Using Graphics Mill License Manager section of this article.
  2. If Visual Studio is already open, close it and then reopen it.
  3. Add a new text file named Licenses.licx (you cannot give this file any other name) into the project, or open an existing one.
    Note

    Normally, Visual Studio hides this file in the Solution Explorer. That's why it is possible that this file already exists in your project (under certain circumstances it is auto-generated). In this case, click Show All Files on the Solution Explorer tree pane to see this file.

    If you use Graphics Mill as a custom control application (rather than in an end-user desktop application), you should add the Licenses.licx file into the desktop application that uses your control.

  4. Add the following string into this file:

    Aurigma.GraphicsMill.Bitmap,Aurigma.GraphicsMill

    In other words, you should add the name of the licensed class and DLL name without the file extension, separated by a comma.

  5. Rebuild the project (not the solution).
Note

If the license key works on the developer's machine and does not work on the customers' workstations, this most likely means that there are some problems with the Licenses.licx file. In this case, check whether you have correctly performed Step 2 above.

Resolving a Problem with the License Type Exception

When you compile your application and obtain the LicenseException: This license type cannot be embedded into the assembly, you should verify the license type of the registered key.

Important

To embed a license key into an assembly, you need a Developer, Desktop Applications license. Such a key must be in the registry at the compilation time.

Building a license resource for desktop applications

If you have a complicated build process or don't want to have a dependency on a registry, it is possible to build a resource for your desktop application manually. In this case, it's not necessary to have a license for the currently building application in the registry.

  1. Place the following files in your working folder:
    • Aurigma.GraphicsMill.dll - the actual version of Graphics Mill you are going to reference.
    • Aurigma.GraphicsMill.lic - a text file with the license key.
    • complist.txt - a text file with Aurigma.GraphicsMill.Bitmap,Aurigma.GraphicsMill string, like in the licenses.licx.
  2. Run the License Compiler.
    lc.exe is a part of Windows SDK, so the probable path where you can find it looks like this:
    "C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.7.1 Tools\x64"

    Run this on the command line:

    lc.exe /target:YourApplicationName.exe /complist: complist.txt /i:Aurigma.GraphicsMill.DLL

    Then, find the generated yourapplicationname.exe.licenses file.

    Note

    The bitness of lc.exe and Aurigma.GraphicsMill.dll files must be the same.

  3. Embed the resource in your project.
    Now you need to put the file obtained in the previous step in your project directory and add the following lines to your .csproj file:
    XML
    <Target Name="BeforeBuild">
      <ItemGroup>
        <EmbeddedResource Include="yourapplicationname.exe.licenses">
          <LogicalName>YourApplicationName.exe.licenses</LogicalName>
        </EmbeddedResource>
      </ItemGroup>
    </Target>
    
  4. Build the project and check that the license is applied correctly.
Important

You need to repeat these steps each time you update your license or Graphics Mill version.

In the Source Code

In your application, you can specify a license key by using the static method License.Set().

C#
var key = "<YOUR_LICENSE_KEY>";
Aurigma.GraphicsMill.Licensing.License.Set(key);

In the web.config File

On a development web server, you can apply a license key in your application's web.config file. To perform this, insert your license key in the appSettings section. For example, for Graphics Mill 10 this key may look as follows:

XML
<appSettings>
    <add key="GraphicsMillLicenseKey" value="<YOUR_LICENSE_KEY>" />
</appSettings>
Important

Don't use this approach with Enterprise licenses (with custom licensing) if you deliver a third-party solution as it may disclose your license key.

License Key Validation

If you have a version earlier than Graphics Mill 10, you can check whether the registered license key is a trial or production key as well as obtain the expiration date. The following code sample demonstrates how to perform that check.

C#
var info = License.Current;
if (info.IsTrial)
{
    Console.WriteLine("Evaluation period expires on " + info.ExpirationDate.ToString());
}
else
{
    Console.WriteLine("Maintenance period expires on " + info.MaintenanceExpirationDate.ToString());
}

Graphics Mill 10 allows you to check the following license parameters.

C#
var lic = Aurigma.GraphicsMill.Configuration.License;
Console.Write(System.String.Format("{0};{1};{2};{3};{4};{5};",
	lic.Source,    // a license key
	lic.IsTrial,   // whether this is an evaluation license 
	lic.ExpirationDate,            // the license expiration date
	lic.MaintenanceExpirationDate, // the maintenance period
	lic.IsDeveloper,    // whether this is a Developer license
	lic.IsDesktopOnly   // whether this license is for desktop use only
));