Appendix B. License Mechanism

Table of Contents

yFiles.NET License Files
General Concept
Development vs. Distribution License Files
Pre-installed License File in Evaluation Distribution
Separate License Files for Purchased yFiles.NET Packages

This appendix covers the license mechanism of yFiles.NET. It explains the basic steps to successfully include a valid license into a yFiles.NET-based application.

yFiles.NET License Files

General Concept

In order to run, a yFiles.NET-based application needs a valid license file properly bundled in the application's assembly. The file's format is XML based. The following example shows a (non-functional) development license file (for a Single Developer license):

Example B.1. What a license file looks like

<?xml version="1.0" encoding="UTF-8"?>
<license version="1.2">
  <product>yFiles.NET</product>
  <type>singledeveloper</type>
  <developer><![CDATA[Joe Average]]></developer>
  <distribution>false</distribution>
  <version>4.1</version>
  <date>07/16/2010</date>
  <watermark>yFiles.NET Development License</watermark>
  <key>90b9a98e11c9923878b2c6403ac60efc60fbacdc</key>
</license>

yFiles.NET uses the functionality of the .NET framework's LicenseManager class. To activate the license at compilation time, you have to:

  • Place the license file in the same directory as your installed yFiles.NET assemblies.
  • License the needed components by placing a licenses.licx file in the Properties subdirectory of your application project (this file has to be included as an "Embedded Resource"). A typical licenses.licx file to activate both the Viewer and the Algorithms part looks like:

    Example B.2. What a licenses.licx file looks like

    yWorks.yFiles.UI.GraphControl, yWorks.yFilesNET.Viewer
    yWorks.yFiles.Algorithms.Graph, yWorks.yFilesNET.Algorithms
    
    Note that while Visual Studio can generate this file automatically when you use GraphControl or CanvasControl in the Visual Studio Designer, it will only create license entries for the UI components (i.e. those in the yWorks.yFilesNET.Viewer.dll assembly). To activate the Algorithms part, you need to edit this file manually and add the entry for yWorks.yFiles.Algorithms.Graph, yWorks.yFilesNET.Algorithms.
  • Rebuild your project.

The .NET framework license compiler will embed the license information into your application. During runtime, no license file is needed (provided it has been embedded during compilation).

Development vs. Distribution License Files

There are two different kinds of yFiles.NET license files that are strictly intended for one of two different situations:

  • During application development, the development license can be used. The application will show a watermark to indicate the usage of the development license. The development license is contained in the following file: yWorks.yFilesNET.DevelopmentLicense.xml
  • For final deployment, the distribution license must be used. The distribution license is contained in the following file: yWorks.yFilesNET.License.xml

It is most important that for final deployment of a yFiles.NET-based application, the development license file must not be included in the application's assembly. Instead, the distribution license file must be included.

Pre-installed License File in Evaluation Distribution

As part of the installation of the yFiles.NET evaluation distribution, the installer executable also installs a development license file that is valid for the evaluation period. By default, this license file is located within the yFiles.NET installation directory in the lib/ directory, where all yFiles.NET assemblies are installed. All programming samples already come with a suitable .licx file that licenses all needed components for the demo.

Note

An evaluation version of yFiles.NET cannot be used together with a non-evaluation license file.

Separate License Files for Purchased yFiles.NET Packages

In non-evaluation distributions of yFiles.NET, there is no license file installed. Thus, to start developing, you only need to copy the development license file that you have received in addition to your licensed yFiles.NET package to the same directory where the yFiles.NET assemblies reside.

Note

A non-evaluation license file cannot be used to activate an evaluation version of yFiles.NET.