79229277

Date: 2024-11-27 07:22:46
Score: 0.5
Natty:
Report link

Further to answer mentioned by @Alexey, this is how I worked it out to embed Aspose libraries as a resource in a .NET Core Web application.

  1. Added a folder named Resources under the Solution > Project > Properties folder. screenshot of Resources folder

  2. Edited the .proj file to add below code:

<!-- Aspose Licence embedded resource include -->
<ItemGroup>
    <EmbeddedResource Include="Properties\Resources\Aspose.Total.NET.lic" />
</ItemGroup>

  1. Added registering of the licence in the Program.cs file (that uses top-level statements)

var AsposeLicenceFileName = "Aspose.Total.NET.lic";
var asposeWordsLicence = new Aspose.Words.License();
asposeWordsLicence.SetLicense(AsposeLicenceFileName);

worked out well for the past many months. good luck.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @Alexey
  • Low reputation (0.5):
Posted by: foxfuzz