Error BC30516 Overload Resolution Failed because no Accessible ‘ToImage’ Accepts this Number of Arguments | C# .NET

I am having a problem with Aspose.Cells. I started a new project in VS Community 2019 , added Aspose.Cells 21.2 through NuGet. The command that worked before is:

            bitmap = sr.ToImage(0)

And now in the error list it says:

Error BC30516 Overload resolution failed because no accessible ‘ToImage’ accepts this number of arguments.

If I try to put in a second parameter, an empty string placeholder for the filename, or if I use the filename that I want to Bitmap.Save to, it says, “Expression does not produce a value.”
Thanks for your help.

@rdaviessci,

I am moving your query in Aspose.Cells forum where you will be guided appropriately.

@rdaviessci,
We have tried to reproduce this issue using the attached sample project which is created in VS Community 2019 and latest version Aspose.Cells 21.2 is added through NuGet. No issue is observed and ToImage() function works fine with single integer argument. You may please give a try to the attached sample project and share your feedback. If issue is not reproduced, share your complete runnable solution with us for testing.
TestToImage.zip (13.7 KB)

Ok, I’ll try that. Meanwhile, here is a screenshot of the line of code, the error message and the Aspose.Cells version:
image.png (33.5 KB)
Thank you.

@rdaviessci,
We can see the issue in the attached image but we need sample project to reproduce this issue here as it will help us to analyze the issue and provide our feedback accordingly.

VPTFileProcess (2).zip (157.3 KB)

Also, the number of SheetRender.ToImage() overloads is different in my project from yours. My project:
image.png (3.0 KB)

Your project:
image.png (2.9 KB)

@rdaviessci,
Thank you for the sample project. We will test it and provide our feedback after detailed analysis.

@rdaviessci,
We have observed this issue where ToImage(int PageIndex) overload is missing in .NET Core version whereas it is available in .NET version. This issue is logged in our database for further analysis. We will write back here once any update is ready for sharing.

This issue is logged as:
CELLSNETCORE-103 - SheetRender.ToImage(int PageIndex) overload missing in Aspose.Cells for .NET Core

@rdaviessci

Please try to change your code from

'CONVERT THE UPLOADED FILE TO AN IMAGE, SAVE ON FILESERVER:
bitmap = sr.ToImage(0)
bitmap.Save(sFileSrvPath & sImgOutFName)

to

'CONVERT THE UPLOADED FILE TO AN IMAGE, SAVE ON FILESERVER:
sr.ToImage(0, sFileSrvPath & sImgOutFName)

YES! That worked… Thank you Very Much, Peyton.

@rdaviessci,

Good to know that it works for your needs. In the event of further queries or issue, feel free to write us back.