License won't load for net6.0, but works fine in .NET Framework 4.8

We are trying to load the license file with this code

new License().SetLicense($"{System.AppContext.BaseDirectory}GroupDocs.Comparison.NET.lic");

This works fine when the application is compiled in .NET Framework 4.8. When we compile using net6.0, it throws an exception.

@nristoTaylor

Could you please share the exception stack trace and also specify following details:

  • API version that you are using
  • OS details (e.g. name and version)