When doing a SetLicense and Some other function call I get an ambiguousMethodException which are managed by your library.
Could you please avoid them?
For internal company practice We have to run in development our program with Break on all exceptions, and avoid them. But currently we cannot due to the fact we cannot avoid this exception in your library.
Please use fully qualified naming for creating objects for Aspose.Cells and other Aspose APIs (in Aspose APIs, there might be some members (classes, methods, etc.) with similar names in different products, so it is better to use fully qualified names for the objects, etc.). See the sample code on setting license for different APIs for your reference:
Aspose.Cells.License licenseCells = new Aspose.Cells.License();
Aspose.Words.License licenceWords = new Aspose.Words.License();
Aspose.Pdf.License licencePDF = new Aspose.Pdf.License();
Aspose.Slides.License licenceSlides = new Aspose.Slides.License();
Aspose.Tasks.License licenceTasks = new Aspose.Tasks.License();
Aspose.Diagram.License licenceDiagram = new Aspose.Diagram.License();
Aspose.Email.License licenceEmail = new Aspose.Email.License();
Let us know if you still find any issue.
In this project we only have Aspose.Cells dll,
in licenseCells.SetLicense(“Aspose.Total.lic”); we got the exception 3 times for one call.
in _workbook.Save(_fileName); we got it 2 times for one call.
in new Workbook(FileName) we got System.ArgumentException: ‘An item with the same key has already been added. Key: 1552’ 4 times
and doing _license = new Aspose.Cells.License(); change nothing
You might have added reference to other Aspose APIs (even you have not used them in code though). If you still could not sort it out by yourselves, kindly create a separate console application (runnable), zip the project and post us here to show the issue, we will check it soon. Please do not include license file in your sample project for security reasons.
Please zip the template Excel file and attach it here as well. We will check the issue soon.
There is no other reference only aspose.cell via Nugets.
Project references are:
Our Tools library without any link with aspose or any other provider
SDK NetStandard.Library 2.0.3
Nothing more. and the problem seems to be Internally SetLicense or Workbook Save
The issue might be on your end only. As requested earlier, kindly create a simple sample application (runnable), zip the project and post us, we will check it soon.
You may please try the attached project which works fine and no issue is observed while loading the license and loading/saving Excel files. Give it a try and share the feedback.
TestDotNetCoreProject.zip (5.8 MB)
I have the same issue with your project,
In Visual Studio Go to Exception setting and activate all Common language Runtime Exceptions.
We have set the Exceptions configuration as per your suggestion and observed the issue. This issue is logged in our database for an investigation and fix (if possible). You will be notified here once any update is ready to share.
This issue is logged as:
CELLSNETCORE-73 - AmbiguousMatchException raised while loading the license or saving a workbook
We are investigating this issue and need your feedback for one of the options i.e. Enable Just My Code. Could you please enable this option in your debug options and share the feedback after testing the scenario again?
Enable Just My Code.PNG (41.1 KB)
For Some project it can work but not all of them,
we have some project using internal nuggets libraries on which we cannot enable this function
Thank you for the feedback. We have logged it with the ticket.