Aspose.Slides for .NET Does Not Work with .NET 6 "Ready to Run"

Hi,
Ready to Run is a feature in .NET Core 3.0 and later where assemblies are precompiled for faster loading (see ReadyToRun deployment overview - .NET | Microsoft Learn). However, when we compile with Ready to Run, the SetLicense method for Aspose.Slides fails:

System.TypeLoadException: Cannot load type '♥   , Aspose.Slides, Version=22.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56'.
   at ♠ .☻(Int32 ☻,   ♥, Boolean& ♣, Boolean)
   at ♠ .☻(Int32 ☻, Boolean ♥)
   at ♠ .☻()
   at ♠ .☻(Object[] ☻, Type[] ♥, Type[] ♣, Object[])
   at Aspose.Slides.License.SetLicense(Stream stream)

We do get the same issue on Aspose.Cells – but the Aspose.Cells team has confirmed that a fix is released this week or the next. See related ticket (not created by me): .NET 6 Support with Linux or non-Windows systems? - #19 by hallgeirl
The same issue also exists in Aspose.Words – see related issue: Aspose.Words and Aspose.Slides does not work with .NET 6 "Ready to Run"

Here’s the publish command we run (on Windows):
dotnet publish -r win-x64 -p:PublishReadyToRun=true -c Debug --no-self-contained .\Foobar.csproj

If we exclude these assemlies from ready to run in the project file:

    <PublishReadyToRunExclude Include="Aspose.Cells.dll" />
    <PublishReadyToRunExclude Include="Aspose.Words.dll" />
    <PublishReadyToRunExclude Include="Aspose.Slides.dll" />

then it works great.

We use the latest version of the assemblies, on .NET6.
Cells: 21.1
Words: 22.2
Slides: 22.1

This is essential for us, especially with Aspose, to decrease the initial execution time of various functions. Up until now we have used .NET Framework, but are porting the code that uses Aspose to .NET 6. This is currently a blocker for us to continue the .NET 6 work.

Is this a known issue for Aspose.Slides? Is there an ETA for a fix if that is the case?

Thank you in advance.

@hallgeirl,
Thank you for contacting support.

Unfortunately, Aspose.Slides does not support .NET 6 yet. I’ve linked this forum thread to an appropriate task with ID SLIDESNET-42778 in our issue tracking system. The tentative ETA for this issue is version 22.6 (June 2022). You will be notified when the issue is resolved.

The issues you found earlier (filed as SLIDESNET-42778) have been fixed in Aspose.Slides for .NET 23.2 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.