Issue with Syncfusion.Licensing in Multi-Framework Setup

I’m encountering an issue with the Syncfusion.XlsIO.Net.Core package in a solution that includes a .NET Standard 2.0 library and two projects referencing it: one .NET 8.0 and one .NET Framework 4.7.2. The .NET 8.0 project works as expected, but the .NET Framework 4.7.2 project throws the error upon running:

System.IO.FileNotFoundException: Could notload file or assembly 'Syncfusion.Licensing, Version=27.2.5.0'

Upon inspecting the NuGet packages under C:\Users\%Username%\.nuget\packages\syncfusion.licensing\27.2.5\lib, I noticed a version mismatch. The Syncfusion.Licensing.dll provided for .NET Framework is versioned 27.2462.5, while the one for .NET Core/Standard is versioned 27.2.5. This mismatch appears to cause the runtime failure in the .NET Framework project.

Is this behavior expected, or is there a way to resolve the version discrepancy and ensure compatibility across all frameworks?

Thank you for your assistance.


3 Replies

YV Yaavann Vignesh Sethuraman Syncfusion Team December 12, 2024 09:33 AM UTC

Hi Fredrik,

The issue arises from using an incompatible NuGet package in the .NET Framework project. To resolve this, we recommend installing framework-specific NuGet packages to ensure compatibility. For the .NET Core/8.0 project, use the core nuget package, and for the .NET Framework 4.7.2 project, use the framework package. Additionally, we have shared the user guide link detailing the NuGet packages required for each platform , Kindly please refer to it.

 

UG Link: Nuget Packages Required 

Regards,
Yaavann.



FR Fredrik December 12, 2024 02:14 PM UTC

Thank you for your response.

I have adjusted the NuGet packages as per your suggestion:

  • My .NET Standard 2.0 project now references Syncfusion.XlsIO.Net.
  • The .NET 8.0 project uses Syncfusion.XlsIO.Net.Core.
  • The .NET Framework 4.7.2 project now references Syncfusion.XlsIO.WinForms.

Despite these changes, I still encounter the same issue with the .NET Framework 4.7.2 project. Specifically, the error persists with the Syncfusion.Licensing assembly:

System.IO.FileLoadException: Could not load file or assembly 'Syncfusion.Licensing, Version=27.2.5.0, Culture=neutral, PublicKeyToken=632609b4d040f6b4' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

The licensing DLL is present in the build output folder, and the package versions seem consistent across the projects. However, the issue remains unresolved when running the .NET Framework project. Notably, the Syncfusion.Licensing.dll in the output folder has version 27.2462.5, which differs from the expected 27.2.5.0 version specified in the reference, potentially causing the manifest mismatch error.



YV Yaavann Vignesh Sethuraman Syncfusion Team December 13, 2024 11:10 AM UTC

Hi Fredrik,

We were unable to reproduce the issue on our end. We have shared the sample tried at our end  for your reference. Kindly review it. We recommend modifying the sample or providing  the issue reproducing sample to proceed further. This will help us to validate the issue and provide you a solution at the earliest.

Regards,
Yaavann.


Attachment: Sample_ce099114.zip

Loader.
Up arrow icon