We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Syncfusion license register without hardcoded

Syncfusion is introduced the licensing system from v16.2.0.41 for Syncfusion NuGet packages and evaluation setup. You should  generate  and register the license key  when launching  your application.


The following steps help you to register the license key in environment variable and without hardcode in your application:


1.  To register the license key in environment, please navigate to Control Panel > All Control Panel Items > System and choose Advanced system settings.



2.  Choose  Environmental variables... from the pop-up.

3.  Select New and set the variable in user variables pop-up. Use the variable name as SyncfusionLicenseKey and value as your license key.





4. Click Ok to complete your license key registration as environmental variable.

5. Download the batch file and extract the zip file.

6. Place the SyncfusionLicenseRegister.bat file in project file location.

7. Open your Visual studio application to apply the license.

8. Use the following code to register the Syncfusion license key from environmental variable:


You can refer to the following link, recommended files for each platform to register the Syncfusion license: 




8. Open the project properties and set the prebuild and postbuild event to replace the license key in compilation time.


PreBuild: cd "$(ProjectDir)" 

SyncfusionLicenseRegister.bat PreBuild {filepath of Syncfusion License registered code} 

PostBuild: cd "$(ProjectDir)" 

SyncfusionLicenseRegister.bat PostBuild {filepath of Syncfusion License registered code} 


Example for WPF application 


PreBuild: cd "$(ProjectDir)" 

SyncfusionLicenseRegister.bat PreBuild App.xaml.cs 

PostBuild: cd "$(ProjectDir)" 

SyncfusionLicenseRegister.bat PostBuild App.xaml.cs


9. The compiled application will run based on the registered license key.





Article ID: Published Date: Last Revised Date: Platform: Control:
9179 08/17/2018 08/28/2018 Miscellaneous Install and Configuration
Did you find this information helpful?
Add Comment
You must log in to leave a comment

Please sign in to access our KB

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon