Licensing Issue with Syncfusion in Dynamically Loaded UserControl

Hello Syncfusion Team,

I am working on a Windows application that enables users to create new Windows applications using AI-generated prompts—without requiring programming knowledge, IDEs, or other development tools.

The AI generates program code, which is then automatically integrated into the host application as a UserControl.

The issue I am facing is that when Syncfusion components are included in the generated UserControl, the license registration fails. I suspect this is due to the NuGet packages being loaded on-the-fly at runtime from within my application.

Is there a workaround for this? It would be an excellent showcase for my software.

Best regards,

Heiko


1 Reply

KR Kalaiyarasu Rasu Syncfusion Team March 18, 2025 02:08 PM UTC

Hi Heiko, 

If you use Syncfusion assemblies from NuGet packages (nuget.org), using it from trial installer, or if you're upgrading from one major version to another, such as from v27.* to v28.* you should generate and register the corresponding version and product license key in your projects to prevent trial license warnings


Syncfusion license keys are major version and product-specific and the generated license key is just a string that needs to be registered before any Syncfusion control is initiated. Please ensure that you have registered the license key in the entry point of your application.

Syncfusion license validation is performed completely offline and occurs at runtime.

Register the License Key Before Loading the UserControl

  • Ensure that the license key is registered in the main application before dynamically loading the UserControl.
     
  • If the generated UserControl is in a separate assembly, the license key should be registered in the main entry point of your application.

    Image_1903_1742306922529
     
  • If the NuGet packages are being loaded dynamically, try registering the license key immediately after the packages are loaded and before the UserControl is instantiated.

  

Refer to this link for generating license key,

https://help.syncfusion.com/wpf/licensing/how-to-generate


Refer to this link for registering license key,

https://help.syncfusion.com/wpf/licensing/how-to-register-in-an-application


Please, ensure that all the referenced Syncfusion assemblies\NuGet packages are all on the same version as license key’s version in your project location. Also ensure the syncfusion.licensing assembly version is in the project output folder.
 

Find below the knowledge base article to know about which version license key should use in application,

https://www.syncfusion.com/kb/8951/which-version-syncfusion-license-key-should-i-use-in-my-application 

If the license key is not registered properly, the below license errors will be displayed.

https://help.syncfusion.com/common/essential-studio/licensing/licensing-errors

Sometimes, old Syncfusion packages might be referred from NuGet cache in the project.

So, could you please try cleaning your project, clear the NuGet cache from both “%userprofile%” folder and the NuGet installed location, deleting the bin\obj folders and rebuild your application, then check whether it resolves the issue?

If the reported issue is still not resolved,  please share us the following details to check issue further from our side, 

  1. List of Syncfusion NuGet packages\assemblies used and its version,
  1. Registered license key in your application,
  2. Target Framework and Platform of your application, 
  3. Screenshot of license key registered place,
  4. How is the UserControl being loaded at runtime?
  5. How are Syncfusion NuGet packages being added dynamically?
  6. Is the UserControl in a separate AppDomain or dynamically compiled at runtime?

Please let us know any concerns.


Regards,

Kalaiyarasu R


Loader.
Up arrow icon