After purchasing the OPC UA .NET SDK you will receive your personal license file. To activate the license in your appliaction you need to take the following steps:
- add the license file to your project as an embedded resource
- load your license file during start up in the Main() function of the application (see example below).
In the example the name of the resource "UnifiedAutomation.Sample.License.License.lic" is composed of:
- Namespace "UnifiedAutomation.Sample"
- Path of the license file "License.License.lic" - the license file is located in an extra folder called license.
static class Program
{
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
try
{
ApplicationLicenseManager.AddProcessLicenses(
System.Reflection.Assembly.GetExecutingAssembly(),
"UnifiedAutomation.Sample.License.License.lic");
Application.Run(new MainForm());
}
catch (Exception e)
{
ExceptionDlg.Show(null, e);
return;
}
}
}