How to Manage & Update Your ComponentOne License in Visual Studio
Quick Start Guide | |
---|---|
What You Will Need |
Visual Studio 2022 |
Controls Referenced | |
Tutorial Concept | This guide walks .NET developers through ComponentOne serial key activation, runtime license generation, and accurate management of the Licenses.licx file for seamless deployment. |
To properly license the MESCIUS ComponentOne controls, you must activate a serial key on your development machine and distribute an embedded runtime license file with your application. In most scenarios, the runtime license is automatically generated and packaged with your app, so you just have to activate your key, and you are good to go.
But there are some scenarios where you may need to create a runtime license manually or update your license files to be compatible with newer control versions.
In this article, we will discuss how to manage these topics using the ComponentOne tools and Visual Studio.
- Activating and Deactivating a License
- Creating a Runtime License
- Creating or Updating the Licenses.licx File
Ready to try it out? Download ComponentOne Today!
Activating and Deactivating a License
When you purchase a ComponentOne license, you will receive a serial key that needs to be activated. This will enable your machine to build projects using ComponentOne controls. Every developer and build machine must be activated, but keep in mind that a single serial key can be activated on up to three devices. This is to include a developer's second workstation and a build machine.
To activate a license from Visual Studio, launch the Tools > MESCIUS > License Manager.
If you don't see the MESCIUS menu option, be sure to download and install some version of the ComponentOne controls.
Then, select Activate/Deactivate License.
This will launch our universal License Manager utility (gclm.exe). This utility displays all MESCIUS products you've installed, including ComponentOne Studio Enterprise, a bundle that includes all ComponentOne Editions. Click the Activate link next to the purchased product to activate your key.
During your 30-day trial, this utility shows you how many days remain in the trial. If you're activating a trial extension key, select ComponentOne Studio Enterprise.
Since each key can only be activated on up to three machines, it's important to deactivate the key before moving to a new computer or transferring the key to a different developer. Once a key has been activated, a Deactivate option appears for the product.
Check out our licensing documentation for more activation scenarios, such as offline activation.
Creating a Runtime License
When you build an application containing ComponentOne controls and already have a valid serial key activated, runtime licenses will automatically be generated for your applications. This runtime license file has the extension ".gclicx," which will be included as an embedded resource with your application. Most users will never have to create a runtime license manually, but let's explore a scenario where this may be necessary.
The runtime license file (.gclicx) is unique to the calling application and, therefore, can't be copied to another project with a different name. For example, you might be working on a user control that contains ComponentOne controls and wish to embed the license with the user control. If you know the name of the calling application, you can manually generate the runtime license by selecting "Create Runtime License" and explicitly specifying the app name. For example, the app name value would look like "ApplicationName.UserControlName.dll". The "dll" or "exe" file extension is not required.
Creating or Updating the Licenses.licx File
Suppose you're working on a WinForms, WPF, ASP.NET Web Forms, or MVC (.NET Framework) project; the ComponentOne controls utilize the .NET model for licensing. Visual Studio will automatically create and modify a licenses.licx file for each control you drag and drop from the toolbox to the design surface. Visual Studio will check that there is a ComponentOne license on the dev machine when your project builds for each control and that it matches the licenses file. If both pass, the project will not display any nag screen at runtime.
A challenge with this system is when the licenses file and your controls become out of sync. This can happen when you upgrade to newer versions of the controls, create controls in code or XAML without dragging them from the toolbox, or in other ways.
By default, specific version information is added to the licenses.licx file. This version information needs to be removed or updated. Additionally, when you first add references to the third-party controls, the Specific Version property gets set to True. This can lead to problems when replacing the DLL with a new version.
The problem is remedied by simply setting the Specific Version property to False for every ComponentOne reference and removing the version number completely from the licenses.licx file (it's lost to time why it was ever required).
Our Visual Studio menu add-on can perform these tasks for you. Simply select Tools > MESCIUS > Update Projects > Make ComponentOne References non-version specific.
Then, select the project you want to update and click the Update button.
This will update all the references to Specific Version = False and remove all version information (Version, Culture, and PublicKeyToken) from your licenses.licx.
The other menu option, Add missing entries to licx file, can scan your applications' references and fully populate the licenses.licx with all possible controls that could be used in your application. This is useful if you have added new controls outside the toolbox.
Conclusion
The Visual Studio menu tools support Visual Studio 2017 and higher and can be installed with any ComponentOne edition.
Ready to check it out? Download ComponentOne Today!
If you have any questions or are still having nag screen issues, don't hesitate to contact our Technical Engagement Team. They will be happy to help resolve any issues you are experiencing.