Migrate from .NET Framework to .NET Core

8 Dec 20232 minutes to read

In this section, we will see about the changes which need to be considered while migrating Syncfusion .NET Excel (XlsIO) library from .NET Framework to .NET Core.

NuGet Changes

.NET Framework .NET Core

Syncfusion.XlsIO.Wpf


Syncfusion.XlsIO.WinForms


Syncfusion.XlsIO.AspNet


Syncfusion.XlsIO.AspNet.Mvc4


Syncfusion.XlsIO.AspNet.Mvc5


Syncfusion.XlsIO.Net.Core

Syncfusion.ExcelToPdfConverter.WinForms


Syncfusion.ExcelToPdfConverter.Wpf


Syncfusion.ExcelToPdfConverter.AspNet


Syncfusion.ExcelToPdfConverter.AspNet.Mvc4


Syncfusion.ExcelToPdfConverter.AspNet.Mvc5


Syncfusion.XlsIORenderer

Syncfusion.ExcelChartToImageConverter.Wpf


Syncfusion.ExcelChartToImageConverter.AspNet


Syncfusion.ExcelChartToImageConverter.AspNet.Mvc4


Syncfusion.ExcelChartToImageConverter.AspNet.Mvc5


Not needed. Same functionalities are moved to

Syncfusion.XlsIORenderer

Namespace Changes

.NET Framework .NET Core

Syncfusion.ExcelToPdfConverter

Syncfusion.XlsIORenderer

Syncfusion.ExcelChartToImageConverter

Syncfusion.XlsIORenderer

Type Changes

Missing Types Alternate Types

ExcelToPDFConverter

XlsIORenderer

ExcelChartToImageConverter

XlsIORenderer

ExcelToPdfConverterSettings

XlsIORendererSettings

Missing Properties

Missing Properties Alternate Properties

IApplication ChartToImageConverter

IApplication XlsIORenderer

Missing Methods

Missing Methods Alternate Methods

IWorkbooks Open(string filename)

The document can be opened as a file stream from the file system using IWorkbooks Open(Stream stream)

IWorkbook SaveAs(string filename, HttpResponse Response, ExcelDownloadType type)

The document can be saved as a file stream to the file system using IWorkbook SaveAs(Stream stream)

IWorkbook SaveAsJson(string filename)

The document can be saved as a file stream to the file system using IWorkbook SaveAsJson(Stream stream)

IWorksheet ImportHtmlTable(string filename, int row, int column)

The HTML table can be imported as a file stream from the file system using IWorksheet ImportHtmlTable(Stream stream, int row, int column)

IPictures Add(int row, int column, string filename)

A picture can be added as a stream from the file system using IPictures Add(int row, int column, Stream stream)

IListObject Refresh()

Not supported due to .NET Framework limitation.

ExcelToPdfConverter ExcelToPdfConverter(IWorkbook workbook)

XlsIORenderer XlsIORenderer()

ExcelToPdfConverter Convert()

XlsIORenderer ConvertToPDF(IWorkbook workbook)

Advantages

  • Supports Windows, macOS, Linux, docker, Azure, and AWS environments.

Known Limitations

  • EMF and WMF images are not supported in .NET Core platforms.
  • Import data from DataGrid, GridView, and DataGridView are not supported in .NET Core platforms.

Notable Changes

  • Drawing library: In .NET Framework, our library makes use of System.Drawing for any text measuring and graphics related operations. Whereas in .NET Core, our library makes use of SkiaSharp graphics library to provide the same type of graphics operations in all the supported platforms.
  • The features such as Excel to PDF, Excel to image, and Chart to image which makes use of SkiaSharp graphics library are separated into a separate package Syncfusion.XlsIORenderer.Net.Core

NOTE

If you want to migrate without any code changes, you can use of the below NuGet Packages when using .NET Framework in your application.