Licensing issues with the yFiles.NET Algorithms assemblies

Troubleshooting

Summary

This article describes the most common licensing related problems with the yFiles.NET Algorithms assemblies.

This article was written for an older version. It is only online as a reference for customers using this old version. The information it contains is probably out of date.

The latest information can be found in the yFiles documentation

Description

The recommended way to register the license is to add it as embedded resource as described here. However, if you already have a working setup which uses the license compiler there you can follow the instructions below for troubleshooting.
If you decide to switch from the license compiler registration to embedded resources, you need to remove the yFiles references from the licx file. Remove the licx file completely if it only contains yFiles references.

Since the yFiles.NET Algorithms assemblies contain no UI components, Visual Studio cannot generate the necessary license information automatically. Therefore, it is necessary the create or update the licensing information yourself.

Signs that the licensing information is incorrect

Incorrect or missing license information for the yFiles.NET Algorithms assemblies leads to the following symptoms:
  • A message that states the cause of the license failure is logged to both System.Console.Out and the Visual Studio Output Window.
    If you don't get any console output, you have to (temporarily) either recompile the application as a "Console Application", or attach a console using the instructions here
  • Nodes created by instances yWorks.Algorithms.Graph do not actually live in the graph, e.g. yWorks.Algorithms.Node#Graph always yields null, and Graph#Nodes is always empty. Trying to remove the node from the graph results in Lists with negative element counts.
  • No automatic layout is performed, e.g. when executing IGraph#ApplyLayout or the various convenience methods.

How to fix licensing problems

Please see Deployment - Licensing for an overview of our license mechanism for yFiles.NET.

In short, you need to perform the following steps:

  • Make sure there is a file yWorks.yFilesNET.[Development]License.xml in the same directory as the yFiles assemblies. You do not have to include this file into your Visual Studio project.
  • If necessary, create a file licenses.licx in your Visual Studio Project and include it as EmbeddedResource.
  • Into the licenses.licx file, insert a line
    • Versions ≥ 5.0: yWorks.Algorithms.Graph, yWorks.yFilesNET.Algorithms
    • Versions < 5.0: yWorks.yFiles.Algorithms.Graph, yWorks.yFilesNET.Algorithms
You cannot use the evaluation version of yFiles.NET together with a non-evaluation license file.

Categories this article belongs to:
yFiles.NET > Licensing
Applies to:
yFiles.NET: 4.0, 4.1, 4.2, 4.3, 5.0, 5.1, 5.2, 5.3, 5.4, 5.5, 5.6
Keywords:
Forms - yFiles.NET - License - Algorithms - Licensing - licx - Empty Graph - License errors