We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to set license in startup.cs using .NET Core 3


I have a valid license untill 2020-09-16 and working on upgrading our product to .Net Core from .Net Framework 4.8

Aspose was fairly easy to install and get up running on .Net Framework with the guides on the website. But i cant find any valid guide for .Net Core.

I have installed the aspose.word nuget and its in my packageReference list

But how do i set up the connection to the .lic file? I made a folder in root of the project with the lic file. Were should i load it? I guess in startup.cs? Inside ConfigureServices or?

Is there some sort of testproject one can look at thats based on .Net Core or some sort of guide to get it up and running?

If its of interest. Its a .Net Core 3 api that i use in combination with a Angular frontend project.


Please read the following article. The answer of your query is well explained here:
How to Apply a License

You can set the license in startup.cs. You need to set the license before using any other Aspose.Words classes.

It explains how to do it in a .Net Framework project. There is 0 examples of .Net Core. PLZ just show how to do it in the startup.cs file. The examplefiles from eather of the posts below ´would be the best way but they are locked down for anyone but the OP or a Mod





Please include the License File as an Embedded Resource and set the license as shown below.

public Startup(IConfiguration configuration)
    Configuration = configuration;
    Aspose.Words.License lic = new Aspose.Words.License();