To use a new pipeline license with older ComponentOne controls (2.0, 4.0, or versions prior to the 2020 v2 release), you can follow the steps below to successfully license your application using the controls.
- Build and license the project normally on a local machine.
- Activate the new license using the License Manager Tool (gclm.exe). This installs a new-style license on your machine.
- Launch the C1LicenseActivation.exe (C:\Program Files (x86)\MESCIUS\ComponentOne\C1StartMenu\Apps) tool and you should see a pop-up asking if you'd like to generate old-style keys that match the newly found license. The old-style key is necessary to license older controls.
- Build the project locally and ensure it's licensed properly.
Learn more about licensing older products with a new license.
- The file in the generated "obj" folder or subfolder that ends in ".licenses" will contain the runtime licenses. The licenses file will be of the form "application.exe.licenses" or "assemblyname.dll.licenses".
where: "application.exe" is the name of the generated exe/program.
"assemblyname.dll.licenses" is the name of the generated dll library.assembly - The *.licenses file can then be added as an embedded resource, but the resource name MUST BE the same as the name of the *.licenses file (you can check it with ildasm.exe).
If the file is embedded from the obj temp directories, it should be embedded with the correct resource name, but this can be inconvenient as the obj folders are often deleted during cleanup.
Instead, the *.licenses file can be added from another folder, but a logical name should be added to the project file EmbeddedResource directive (use notepad to manually edit the project file .csproj/.vbproj) with the correct name. For example, if the file "application.exe.licenses" is copied to the project Properties folder:
<ItemGroup><EmbeddedResource Include="Properties\application.exe.licenses" ><LogicalName>application.exe.licenses</LogicalName></EmbeddedResource></ItemGroup> - Finally, remove the C1 control entries from the Properties\licenses.licx file. Removing these entries will eliminate the need for a design time license during the build. A design time license will still be required to manipulate the controls at design time in the Visual Studio designer.
Each time a new C1 control as added to a form in the application, it will be necessary to repeat the above steps to get a new "application.exe.licenses" file with the additional runtime license.
Hunter Haaf