Skip to main content Skip to footer

How to Manage & Update Your ComponentOne License in Visual Studio

To properly license GrapeCity’s 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 - so you just have to activate your key, and you are good to go. 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.

You can use our Visual Studio licensing tool add-ons to help with these essential licensing tasks. You can access these features from the Tools > GrapeCity menu in Visual Studio.

License Manager

In this article, we will discuss how to manage these topics from Visual Studio:

Activating and Deactivating a License

When you purchase a ComponentOne license, you will be issued 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, launch the Tools > GrapeCity > GrapeCity License Manager and select Activate/Deactivate License.

Activate/Deactivate License

This will launch the GrapeCity License Manager (gclm.exe) utility. This utility displays all products you've installed plus ComponentOne Studio Enterprise, a bundle that includes all ComponentOne Editions. Click the Activate link next to the purchased product to activate your key.

GC License Manager

During your 30-day trial, this utility shows you how many days you have left.

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 you already have a valid serial key activated, runtime licenses will be automatically generated for your applications. This runtime license file has the extension ".gclicx" which gets included with your application as an embedded resource. For most users, you will never have to create a runtime license manually, but let's look at a scenario where you might need to.

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.

Select Projects to generate Runtime License

Take the output .gclicx file, add it to the Properties folder of the user control project, and set its BuildAction to EmbeddedResource.

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 get out of sync. This can happen when you’re upgrading to newer versions of the controls, creating controls in code or XAML without dragging from the toolbox, or another way.

We also have menu add-ons that can resolve these nag screens issues. The first can be used to update your project from one version to another. When you first add references to the third-party controls, the "Specific Version" property gets set to true, and the specific version number gets printed in the licenses.licx file. 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. Our Visual Studio add-on does this for you.

To use this tool, launch the utility via Tools > GrapeCity > Update Projects > Make ComponentOne References non-version specific.

Make C1 Reference Non-Version Specific

Select the project(s) you want to update and click the Update button.

Select Projects to remove version information

This will update all the references to Specific Version = False and remove all Version, Culture, and PublicKeyToken text from your licenses.licx.

Another issue that can occur is when you have controls used in your project, but they are not referenced in the licenses.licx file. There's also an add-on menu option that will scan your applications’ references and fully populate the licenses.licx with all possible controls that could be used in your application.

To use this tool, open the utility via Tools > GrapeCity > Update Projects > Add missing entries to licx file.

Add missing entries to licx file

You will then select the project(s) you want to fix and click Update.

Select Projects to update licenses.licx

This will create a line entry for every possible control for ComponentOne DLL’s referenced in your project. Using all those controls in your project is unnecessary, but this covers all possible scenarios and will ensure the nag screen is suppressed. Also, you cannot have licenses.licx entries for DLL’s if they are not referenced in your project, as this will cause “Unable to resolve type” errors. The new entries will also be added without Version, Culture, and PublicKeyToken to avoid the issues from above when updating controls.

These add-ons were added in our 2019 v2 release and will work in both Visual Studio 2017 and newer versions. We install the add-on with any ComponentOne Edition installation. But if you are looking just to install the Visual Studio add-on tools, you can do so from the C1ControlPanel on the Tools tab.

Visual Studio Add-on Tool

If you have any questions or are still having nag screen issues, don't hesitate to contact our Technical Engagement Team, and they will be happy to help resolve any issues you are experiencing.

Download Now!

 

comments powered by Disqus