Licensing issues with the yFiles Algorithms assemblies

Troubleshooting

Summary

This article describes the most common licensing related problems with the yFiles 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 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 Algorithms assemblies leads to the following symptoms:

  • A message that states the cause of the license failure is logged to both the standard error stream 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 Graph instances do not actually live in the graph, e.g. Graph always yields null, and 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 calling ApplyLayout or the various convenience methods.

How to fix licensing problems

Please see Licensing for an overview of our license mechanism for yFiles WPF.

In short, you need to perform the following steps (replace NET by WPF if you are using yFiles WPF):

  • 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

    yWorks.Algorithms.Graph, yWorks.yFilesWPF.Algorithms
    
You cannot use the evaluation version of yFiles.NET or yFiles WPF together with a non-evaluation license file.

Categories this article belongs to:
yFiles WPF > Licensing
Applies to:
yFiles WPF: 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6
Keywords:
Forms - WPF - yFiles WPF - Licensing - licx - Empty Graph - License errors