Compiler Error Message: BC30560: 'License' is ambiguous in the namespace 'Aspose.Cells'

My ASP.NET code runs fine on my local machine, but when copied to the web server, I get the following error message:

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30560: 'License' is ambiguous in the namespace 'Aspose.Cells'.

Source Error:

Line 61: 
Line 62:     Protected Sub setUpLicense()
Line 63:         Dim license As Aspose.Cells.License = New Aspose.Cells.License()
Line 64:         license.SetLicense("Aspose.Total.lic")
Line 65: 

Aspose.Cells.dll, Aspose.Cells.xml, and Aspose.Total.lic are in the application's Bin folder. What may be causing this error. At the top of the file, I have imported Aspose.Cells by including the text "Imports Aspose.Cells"

Hi,

Thanks for considering Aspose.

That's look strange as we don't find the problem you have mentioned. Any how we will also try to investigate to figure out the issue you are contracting.

Thank you.

I think maybe it's a configuration problem. Do you compile your application on server again? Can you create a simple project to demonstrate your problem and post it here? Thank you.

This time, I used the example "Hello World" code from the Aspose website. The Aspose.Total.lic and Aspose.Cells.dll files are in the Bin folder. I compiled the website on the server also, but I'm still getting the exact same error message.

Code as follows:

Imports Aspose.Cells

Partial Class _Default

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

'Create a License object

Dim license As Aspose.Cells.License = New Aspose.Cells.License()

'Set the license of Aspose.Cells to avoid the evaluation limitations

license.SetLicense("Aspose.Cells.lic")

'Instantiate a Workbook object that represents Excel file.

Dim wb As Workbook = New Workbook()

'Note when you create a new workbook, a default worksheet

'"Sheet1" is added (by default) to the workbook.

'Access the first worksheet "Sheet1" in the book.

Dim sheet As Worksheet = wb.Worksheets(0)

'Access the "A1" cell in the sheet.

Dim cell As Cell = sheet.Cells("A1")

'Input the "Hello World!" text into the "A1" cell

cell.PutValue("Hello World!")

'Save the Excel file.

wb.Save("MyBook.xls", FileFormatType.Excel2003)

End Sub

End Class

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30560: 'License' is ambiguous in the namespace 'Aspose.Cells'.

Source Error:

Line 6:      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 7:          'Create a License object
Line 8:          Dim license As Aspose.Cells.License = New Aspose.Cells.License()
Line 9:  
Line 10:         'Set the license of Aspose.Cells to avoid the evaluation limitations

Hi,

Could you create a fresh sample project, zip it (with all the files including license file) and post @ nanjing@aspose.com with all the details, we will look into your issue soon.

Thank you.

I e-mailed the files and details last Tuesday (6/24/08). Did anyone receive the information? I have not gotten a response to let me know anyone received it or solved the problem.

Thanks.

Hi,

Thanks for following up your issue.

We will get back to you soon.

Thanks for being patient! :)

No, we don't receive your email. Where do you send the email to?

Which version of Aspose.Cells are you using? Can you create a simple project to verify the ambiguous reference issue?

I sent the e-mail, including the .zip file, to nanjing@aspose.com , as I thought was requested above. Where would you like me to send it?

Where might I find the version number for the Aspose.Cells? We have purchase Aspose.Total.


Thanks.

I don't receive your email maybe it's blocked. Please zip and post your project here. It can be only downloaded by you and Aspose members.

For version number, please find Aspose.Cells.dll and right-click the dll. Then you can see the version number.

ASPOSE Version 4.2.0.5

The .zip file is attached.

Hi,

Well, we checked your license file (Aspose.Total.lic) and tested it with the component, it woks fine.

Actually you are making a mistake in your code, you are referring Aspose.Cells.lic file for SetLicense method of the License object instead of Aspose.Total.lic file which you have. Please try to change your licensing code as follows and use the latest version of Aspose.Cells (4.5.0.0): http://www.aspose.com/community/files/51/file-format-components/aspose.cells/entry133353.aspx

'Create a License object
Dim license As Aspose.Cells.License = New Aspose.Cells.License()

'Set the license of Aspose.Cells to avoid the evaluation limitations
license.SetLicense("Aspose.Total.lic")

Feel free to contact us any time if you need further assisstance.

Thank you.

Hi sas,

Since the team has downloaded the license file, I have removed the zip file. The web team is improving the forums so you can send emails including attachments to a certain username via the forums.

Good morning,

I've corrected the code as recommended. I've also installed the latest version of Aspose.Cells (4.5.0.0), but I'm still receiving the same error as described above. I've attached the latest version of the files used in a .zip file.

Compilation Error

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: BC30560: 'License' is ambiguous in the namespace 'Aspose.Cells'.

Source Error:

Line 6:      Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Line 7:          'Create a License object
Line 8:          Dim license As Aspose.Cells.License = New Aspose.Cells.License()
Line 9:  
Line 10:         'Set the license of Aspose.Total to avoid the evaluation limitations

Hi,

That looks strange. We tested your license file with your code but could not reproduce the issue you have mentioned. Any how, we will further investigate and look into your issue.

Thank you.

Hello again,

The system administrator solved my issue. There were two different versions of the .dll, an older one in the global assembly cache and the latest on the server in my application's Bin folder. Once the .dll was removed from the global assembly cache, the error no longer occurred.

Thanks for your time.