How can I add the license file to dotnet 7 web application project?
There are no special instructions to add or set license file in .NET 7 web application, this is same as you usually do it for any ASP .NET Core or other web projects. You may add license file to the project and then set the license in code. You can load and apply license from file path or from streams. Please note, the core thing is the licensing code should be processed at first and before using any other Aspose APIs. See the document on Licensing and Subscription for Aspose.Words as an example for your reference.
Mine worked by setting the license file to copy to the output folder and then in the program.cs file right under this:
var builder = WebApplication.CreateBuilder(args);
I added this:
Aspose.Words.License lic = new Aspose.Words.License();
lic.SetLicense(@"Aspose.Words.NET.lic");
Thank you for providing your feedback, and it’s great to hear that the license is functioning properly for you.