Migrate from .NET Framework to .NET Core
29 Nov 20242 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
Namespace Changes
.NET Framework | .NET Core |
Type Changes
Missing Types | Alternate Types |
Missing Properties
Missing Properties | Alternate Properties |
Missing Methods
Missing Methods | Alternate Methods |
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) |
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) |
A picture can be added as a stream from the file system using IPictures Add(int row, int column, Stream stream) | |
Not supported due to .NET Framework limitation. | |
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.
- Syncfusion.XlsIO.WinForms
- Syncfusion.XlsIO.Wpf
- Syncfusion.ExcelToPdfConverter.WinForms
- Syncfusion.ExcelToPdfConverter.Wpf
- Syncfusion.ExcelChartToImageConverter.Wpf
The above approach is not recommended.