Aspose.Email DLL 25.4 version conflict in .NetFramework 4.8

Hi Aspose Team,

In our project ( .Net Framework 4.8) I am trying to refer latest version of Aspose.Email(25.4.0) but it throws following error message System.IO.FileNotFoundException: ‘Could not load file or assembly ‘System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.’

Also, we tried version 21,22,23,24 it does not work with any of those versions. Only Aspose.Email with version 20.12.0.0 works fine.

Please let us know how we can use the latest version of Aspose.Email in .Net Framework 4.8 project

Hello @Nithyav,

Thank you for reaching out to us.

The error you’re encountering typically indicates that the application is trying to load a .NET 6+ dependency in a .NET Framework project. While .NET Standard 2.0 is compatible with .NET Framework 4.6.1 and above, it does require all necessary dependencies (like System.Runtime) to be correctly resolved.

Please try to install Aspose.Email via NuGet, which automatically resolves most dependencies.

Thanks for the response.

We tried installing Aspose.Email via NuGet in our .net framework 4.8 project but it throws System.IO.FileNotFoundException: ‘Could not load file or assembly ‘System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a’ or one of its dependencies. The system cannot find the file specified.’ on installing aspose.email via nuget does not add system.runtime and also aspose.email refers System.Runtime version 6.0.0 as per error message.

Kindly Advise.

Below is screen capture of aspose.email installation

image.png (38.1 KB)

System.Runtime latest version supported in .Net Framework 4.8 is as below
image.png (49.6 KB)

@Nithyav,

Please try the following steps:

  1. Run the command:

    dotnet nuget locals all --clear
    

    This will clear all NuGet caches.

  2. Delete the bin, obj, and .vs folders from your solution directory.

  3. Restart Visual Studio completely (not just close and reopen the solution).

Sometimes Visual Studio or NuGet gets stuck with incorrect assembly bindings, and this helps clear it up.

Also, a similar issue was discussed here:
:point_right: Could not load file or assembly ‘System.Runtime, Version=6.0.0.0’
The solution provided includes suggestions on resolving binding redirects.

If it’s still not working after that can you please share the .csproj file?

Hello @margarita.samodurova

We are also experiencing problems with Aspose.Email build 25.4.0 used in a .NET Framework 4.8 solution

In our development we have been keeping our nuget packages up to date and I can confirm that the same code has been working just fine for many months, and when I revert back to Aspose.Email 25.3.0 the problems go away.

Something has gone wrong with your nuget package for Aspose.Email 25.4.0 targeting .NET Framework 4.8

This must be corrected with some urgency.

Kind regards

@rozeboosje

To help us investigate this, could you please specify the problems you’re encountering?

Thank you.

@margarita.samodurova
We tried the above steps but it did not work. Attaching .csproj file of a sample console app.
Please suggest.
PDFGenerationCSPrjFile.zip (1.7 KB)

Hello @margarita.samodurova - You made my own topic “private” which is fine but if there is a way to give access to it to @Nithyav I’d be happy for you to do so. I reckon their issue and ours are caused by the same root cause?

@Nithyav,

Thank you for the update. We’ll analyze the problem and get back to you soon.

Thank you. There’s no need to add Nithyav, as his issue will be worked on regardless and he will be kept informed.

Can you please let us know if there is any update on this issue reported? Thanks

Hello @Nithyav,

the issue has been fixed in version 25.4.1 and later.

Thank you.