angularsyncfusionej2-syncfusion

Syncfusion Error: Could not load file or assembly 'Syncfusion.XlsIORenderer.Portable, Version=20.2140.0.44, Culture=neutral, PublicKeyToken=3d67...'


I am working on the spreadsheet module and trying to save a test file. I'm using angular with web api. Here is the api code:

    [HttpPost]
    [Route("save")]
    public IActionResult SaveConflict([FromForm] SaveSettings saveSettings, string customParams)
    {
        
        try
        {            
            return Workbook.Save(saveSettings);
        }
        catch (Exception ex)
        {
            var msg = ex.Message;
            return null;
        }
    }

It's throwing the following error: Could not load file or assembly 'Syncfusion.XlsIORenderer.Portable, Version=20.2140.0.44, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89'. The system cannot find the file specified.


Solution

  • Try the following:

    1. Upgrade all Syncfusion Nuget packages to their newest versions
    2. Additionally, install Syncfusion.XlsIORenderer.Net.Core nuget package (assuming you are on .NET 6/7)

    It solves the issue for me.