You must register the key before any Syncfusion control is rendered. The best place is in your application's entry point.
For ASP.NET Core / Blazor (Program.cs):
using Syncfusion.Licensing;var builder = WebApplication.CreateBuilder(args);
// THE FIX: Register your key here SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY_HERE");
builder.Services.AddRazorPages(); // ... rest of your codesyncfusion trial license key fix
For Windows Forms / WPF (.NET Framework / .NET Core):
// In Program.cs (Main method) or App.xaml.cs constructor using Syncfusion.Licensing;
static void Main() SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY_HERE"); Application.Run(new Form1());
For Xamarin / MAUI (App.xaml.cs):
public App()
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_LICENSE_KEY_HERE");
InitializeComponent();
Syncfusion has a known issue where the trial key expiration is cached at the machine level. Fix it like this:
This is where most people fail. You must register before any Syncfusion control is referenced or created.
For .NET Core / .NET 5+ (Web Apps, Blazor, WinForms):
In Program.cs, right after CreateHostBuilder or at the top of Main: You must register the key before any Syncfusion
public static void Main(string[] args) // MUST be first line inside Main Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_TRIAL_KEY_HERE");CreateHostBuilder(args).Build().Run();
For legacy .NET Framework (WinForms, WPF):
In App.xaml.cs (WPF) or Program.cs (WinForms), inside the constructor or OnStartup:
public App()
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_TRIAL_KEY_HERE");
For Blazor WebAssembly (client-side):
In Program.cs (of the client project), right after using statements and before await builder.Build().RunAsync();: For Windows Forms / WPF (
Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR_TRIAL_KEY_HERE");