Troubleshooting PowerTCP for .NET Licensing

In order to distribute applications which use PowerTCP for .NET components a license must be purchased from Dart Communications or an authorized reseller. A licenses.licx file must also be included with each project in order for the application to compile. Typically, this will automatically be created by Visual Studio .NET when dragging a component onto the form. The only exceptions to this are when the component is being used as a reference within Visual Studio .NET or when the component is being used outside of Visual Studio .NET. In these situations, a licenses.licx file must be explicitly created and added to the project.

Rebuild the Project and not the Solution

The most common problem when using a 3rd party control in Visual Studio is Rebuilding the Solution rather than the specific project within the Solution.  When any licensing change occurs, the Project must be rebuilt. Often times, developers rebuild their Solution, assuming that the Project will also be rebuilt, but such an operation will not update the cached licensing information.   Also, a Solution may have multiple Projects, so it's imperative that the Project which references the PowerTCP for .NET dlls is actually rebuilt.  Figure 1 demonstrates Rebuilding the Project from the drop-down menu, rather than the Solution.  If this does not force the environment to re-cache the licensing information, one final step is to delete the contents of the Output directory, which is often the "..\bin\" directory.  This will force the environment to rebuild and re-cache all information.

[Figure 1]
Visual image of rebuilding the Project

 

The second most common problem occurs when users are using a component as a reference rather than dragging and dropping the component onto a form.  This type of usage does not force the environment to automatically create a licenses.licx file, and thus the user must take this action themselves. 

To create a licenses.licx file, use the following steps (This example demonstrates using the Smtp component).

   1.  Start a new application in Visual Studio .NET and add the Smtp component as a reference.

   2.  In the Solution Explorer, right-click the project name, choose Add, then Add New Item.(Figure 2)

[Figure 2]

 Adding an item to a Project

   3.  From the resulting dialog box, choose Text File and name the file "licenses.licx". Click Open. (Figure 3)

[Figure 3]

Adding a text file

   4.  Type the following in the licenses.licx file

Dart.PowerTCP.SecureMail.Smtp, Dart.PowerTCP.SecureMail


and save the file. You should now be able to compile and run a project that uses the Smtp component as a reference.

The actual text for the licenses.licx will vary depending on the product you are using.  Please see the on-line help that is included with the product for details.

The most common problem in the above scenario is when the licenses.licx file is added to the Solution, rather than the Project.  It is imperative that the licenses.licx file is located under the current Project.