Cell.Net ambiguousMethodException

Hi,
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.

thanks

@Chabie,

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:
e.g
Sample code:

Aspose.Cells.License licenseCells = new Aspose.Cells.License();
            licenseCells.SetLicense("Aspose.Total.lic");

            Aspose.Words.License licenceWords = new Aspose.Words.License();
            licenceWords.SetLicense("Aspose.Total.lic");

            Aspose.Pdf.License licencePDF = new Aspose.Pdf.License();
            licencePDF.SetLicense("Aspose.Total.lic");

            Aspose.Slides.License licenceSlides = new Aspose.Slides.License();
            licenceSlides.SetLicense("Aspose.Total.lic");

            Aspose.Tasks.License licenceTasks = new Aspose.Tasks.License();
            licenceTasks.SetLicense("Aspose.Total.lic");

            Aspose.Diagram.License licenceDiagram = new Aspose.Diagram.License();
            licenceDiagram.SetLicense("Aspose.Total.lic");

            Aspose.Email.License licenceEmail = new Aspose.Email.License();
            licenceEmail.SetLicense("Aspose.Total.lic");
........

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

@Chabie,

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.

Hi,
There is no other reference only aspose.cell via Nugets.
Project references are:
Aspose.cells 20.7.0
Newtonsoft.Json 12.0.3
System.ComponentModel.Annotations 4.7.0
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

@Chabie,

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.

@Chabie,
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)

Hi,
I have the same issue with your project,
In Visual Studio Go to Exception setting and activate all Common language Runtime Exceptions.

best regards

@Chabie,
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

@Chabie,
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

@Chabie,
Thank you for the feedback. We have logged it with the ticket.