In some situations, license information needs to be manually included into application using licensed controls. This article explains when and how to do it.
Using licensed controls and components in .NET is very transparent in most situations, Visual Studio .NET and the .NET framework work in unison to take all the necessary steps to make it work. The following link points to an article on how licensing works in .NET, it describes in detail how licensing is implemented and the tools and classes involved in the process, it makes a good reading for people building or using licensed controls (like Chart FX), components or classes.
http://www.gotdotnet.com/team/windowsforms/Licensing.aspx
How does all this affects you as a Chart FX for .NET user ?
If you are building a stand-alone application where the charts are created at design time, you don't have to do anything especial.
You do need to take additional steps in the following cases:
- You are building a DLL that uses Chart FX for .NET, this DLL is then used by an application (EXE).
- You are creating all of your charts at run-time, purely by code.
- You are using a tool or language that has no support for Design Time licensing, for example Managed C++
If you are in one of these scenarios, you must embed the license information of Chart FX for .NET as follows:
1) If your project does NOT have a Licenses.licx file in your project, add an empty one (text file).
2) Add the following line to it:
SoftwareFX.ChartFX.Chart, ChartFX
3) If you are using Visual Studio .NET and your application is written in C# or VB simply re-build your executable, otherwise (if you are not using VS .NET or if you are using Managed C++) continue to step 4.
4) Execute the following command from the folder in which your executable, ChartFX.dll, ChartFX.Base.dll and licenses.licx reside:
lc /target:<Name of your Executable.exe> /complist:licenses.licx /i:ChartFX.DLL
A .licenses file will be created in the same folder.
Note: If you use other licensed controls, components or classes in your application you must include a reference to EACH DLL using /i and a line in licenses.licx for every licensed class.
5) Embed this .licenses file as a resource into your executable, you can do this at linking time by using the /ASSEMBLYRESOURCE option. If you are using Visual Studio you can embed this file by going to the Linker properties and adding the reference under "Embed Managed Resource File" (Input category).
6) Test your application by running it in a computer where Chart FX is not installed.