CS0234 The type or namespace name 'Licensing' does not exist in the namespace 'Syncfusion'

I am trying to follow the instructions in the article 'How to Register Syncfusion License Key?'.

In my Program.cs file I first referenced Syncfusion by adding the following line to the declarations:

using Syncfusion.Blazor;

For some reason there is is no public static async Task Main(string[] args)  method listed.  (this is Dot.NET 8.0, so maybe it does things different than Dot.NET 6.0).

I added my line to register my Syncfusion license just above the line '
var builder = WebApplication.CreateBuilder(args);' like so:

//Register Syncfusion license 
    Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("YOUR LICENSE KEY");  
    var builder = WebAssemblyHostBuilder.CreateDefault(args); 



This is where I get the error.  I tried adding the following using declaration: 'using Syncfusion.Licensing;'  but as indicated in the error, it doesn't seem to exist under syncfusion.  What am I doing wrong?


2 Replies

MT Marc Tucker December 23, 2023 02:48 PM UTC

A little more digging and I found that the Syncfusion.Licensing wasn't referenced in my project.  I added it using NuGet.  Problem solved.



MK Muthukrishnan Kandasamy Syncfusion Team December 26, 2023 11:25 AM UTC


Hi Marc,


We are glad to know that you have resolved your reported problem by referring the Syncfusion.Licensing NuGet package in your application.


Refer to the below ug links for Licensing errors and FAQ,


https://blazor.syncfusion.com/documentation/getting-started/license-key/licensing-errors


https://blazor.syncfusion.com/documentation/getting-started/license-key/licensing-faq


Regards,

Muthukrishnan K


Loader.
Up arrow icon