Many a time developers using third party components in their applications are troubled with evaluation banners, trial nags when the application is deployed to another machine. However these nags or banners are not seen in the project when run in the development machine where the components have been installed and licensed. I take this opportunity to present some knowhow on how to handle such situations that I have managed to attain working as a member of the Technical Support Team with Grapecity Data Dynamics.
How does licensing of Components work in .NET
When a component is installed and licensed on a developer’s machine, some mechanism (differs from vendor to vendor) is implemented (some file is placed inside the machine or some registry key is entered) whereby the machine is tagged as licensed.
Now when you drop in the licensed control into a Form of your VS solution, a licenses.licx file is created (if not created automatically then add a text file to the root of your solution->rename it to licenses.licx) and the entries are automatically added. You may get in touch with the support team of the component vendor for the exact entries you want to have. However you will need to make sure that the version info in this licx file for the component is the same that you compile the application with and use in your production environment .If you change the version of the component you need to update the version info in this licenses.licx file as well and recompile.
Now , if you are compiling your project in visual studio ,then the .NET License Compiler(Lc.exe at C:\Program Files\Microsoft SDKs\Windows\v7.0A(this may vary depending on the version of VS you have)\bin) would compile the licenses.licx file into a .licenses file and the CSharp compiler(csc) or the VB.NET compiler would embed the .licenses file into the final assembly(exe,dll) created .You can verify this by opening up the assembly in a disassmbler(e.g.:-Red Gate .net reflector)->go to the resources tree. You will see a hash code associated with the class’s information.
Please take a look at the following link about lc.exe
Now many a times, developers use command line scripts to build their application and observe the evaluation banner in the production site. This is because they do not include calls to lc.exe->compile the .licenses file etc. in their scripts. This may be resolved by including calls to the same in the scripts.
Components in dlls
Sometimes developers use the third party components within a dll and call them in a second application (2-tier or 3-tier application) and observe evaluation banner in the production machine. To resolve this problem once again, you need to make sure that the machine in which you are compiling the final application that would be consuming the dll should be licensed with the component and the licenses.licx with required entries should be at the root of the consuming assembly.
However, this situation may again be handled differently from component vendor to vendor. At Grapecity Data Dynamics, we have a separate utility to handle such situations. This utility would essentially create a satellite license dll for your dll which consumes our products. You need to push the satellite dll across to the deployment machine such that the dll and the satellite dll are in the same location.
I think this information would be helpful to developers who use third party controls in their app and are troubled with evaluation nags.