Divelements
Because every action starts with the presentation layer
Knowledge Base
  Home Products Downloads Store Support Corporate  
About Licensing
Home / Support

We use the standard .NET component model licensing infrastructure to implement licensing support in our products. This page serves as an explanation of how the process works. Some troubleshooting advice is also included because occasionally Visual Studio experiences a few bugs related to this licensing mechanism.

Silverlight Licensing is a separate topic and the information contained within this page is not relevant to those components.

How Licensing Works

When you install and activate one of our products, a setting is stored on your computer to indicate the product is correctly licensed to your company. This setting is stored in the registry.

Upon opening a designer containing our products in Visual Studio, or adding one of our products to an existing designer, Visual Studio detects a licensed component and creates (or adds to) a file called licenses.licx in your solution. If you are using Visual Studio 2005 or later this file is in the Properties folder, otherwise it can be found in the root if "show all files" is turned on. The file contains a list of types you are using that are licensed.

At compile time, Visual Studio goes through this file and validates all these licensed components. Upon successful validation it embeds licensing information into your final assembly.

Troubleshooting

Q. I installed a commercial version of a product but I see an "evaluation" watermark at design time. What's wrong?

This means the product did not locate any activation code in the registry. Check that you activated the product during install, and that the product was able to store its activation key in the registry at the location below.

HKLM\Software\Divelements Limited\Registration

Q. I do not see an "evaluation" watermark at design time, but when running I get a warning mentioning a licenses.licx file. What's wrong?

This means that at runtime the product failed to find licensing information in your assembly, then it checked whether it was installed in a development capacity and found that it was. This situation can only mean that Visual Studio did not correctly embed your license into your assembly. The warning message will let you know what lines need to go in your licenses.licx file (see below).

Q. I'm building an XBAP application and see an "evaluation" watermark even when I've activated the product. What's wrong?

Normal .NET licensing does not work in XBAP partial-trust scenarios. You need to use build machine activation when deploying your application as an XBAP.

Q. What if I need to use your product in a DLL which will, in turn, be used by another EXE?

This will work just fine. Visual Studio will create a licenses.licx file in your DLL (if it doesn't, follow the instructions below) and that will be picked up at runtime by the licensing engine. There is no need to modify your entry executable.

Creating or Maintaining a licenses.licx File

If there is no licenses.licx file in your project it is quite easy to create one. Right-click on the project and choose Add New Item. Select Text File and name it licenses.licx. Select the file in the solution explorer and, using the properties window, ensure its Build Action is set to Embedded Resource.

Open the file and look at its contents. There should be a line in the file for each licensed class you are using. The lines should be in the format type,assembly where assembly can be either a short or fully-qualified assembly reference. If one of our products detects that one or more of these lines are missing from the file it will examine itself and let you know what lines to insert. For example, if you are using a class called TD.SandDock.DockContainer and the assembly is SandDock.dll the entry for the class would be:

TD.SandDock.DockContainer,SandDock

Note that by default Visual Studio will include full assembly information including public key, version and culture, for each line in the file. This is not helpful for situations where you upgrade the version of the component from time to time. You can safely remove all the assembly information apart from its filename (without the .dll extension) and this will generally give you a much better experience when upgrading since Visual Studio will not be searching for a specific assembly version any more.

Copyright © 2003 - 2009 Divelements Limited       About | Contact | Privacy