We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Dll conflict

hello
I am getting this error for Error : The type 'Aspose.Cells.PageSetup' exists in both 'C:\Development\Apps\MLCS\MLCSNet\Bin\Aspose.Cells.dll' and 'C:\Development\Apps\MLCS\MLCSNet\Bin\Aspose.Cells.GridWeb.dll' C:\Development\Apps\MLCS\MLCSNet\SummaryMonthly.aspx.cs 420 13 C:\...\MLCSNet\

i have 2 dll on my project Aspose.Cells and Aspose.Cells.WebGrid.

this is my code.
PageSetup pageSetup = wb.Worksheets[0].PageSetup;

Hi Piyush,

Thanks for your posting and using Aspose.Cells.

Please use the latest version of Aspose.Cells and Aspose.Cells.GridWeb dlls which you can download from this link: Aspose.Cells for .NET 8.3.1.

I have tried your code with latest version and did not encounter any dll conflict issue so your issue should be resolved with the new dlls.

If your problem still occurs, then please provide us your project causing dll conflict issue. We will look into it and update you asap.

I can not use new dll as we have to test whole application and it is running in production.

even with fully qualified name why it is giving conflict please ask other support team member how to resolved this. this is not solution to upgrade to new version.

Hi Piyush,


Please try by using fully qualified namespaces in order to tell the compiler which object you wish to access/create. It should resolve the problem of conflicting class names. Please check the following piece of code for elaboration.

C#

Aspose.Cells.Workbook book = new Aspose.Cells.Workbook();
Aspose.Cells.Worksheet sheet = book.Worksheets[0];
Aspose.Cells.PageSetup setup = sheet.PageSetup;

This is my code:
Aspose.Cells.Workbook wb = new Aspose.Cells.Workbook();
Aspose.Cells.Worksheet sheet1 = wb.Worksheets[0];
Aspose.Cells.PageSetup pageSetup = sheet1.PageSetup;
//pageSetup.SetFooter(1, "&P");
//pageSetup.SetFooter(2, "&N");

Still i am getting this error:

Error 6 The type 'Aspose.Cells.PageSetup' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\recc_reccnet\436aca20\1a5166f2\assembly\dl3\c7cdcccb\005c36bc_ec89cf01\Aspose.Cells.DLL' and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\recc_reccnet\436aca20\1a5166f2\assembly\dl3\068ef6ca\00d2ba75_ee47cf01\Aspose.Cells.GridWeb.DLL' C:\Development\Apps\MLCS\MLCSNet\SummaryMonthly.aspx.cs 286 26 C:\...\MLCSNet\
v

Hi Piyush,


We are sorry to know that you are still experiencing the said problem.

In order to further evaluate your presented scenario, I have created a sample web application and referenced both latest revisions of Aspose.Cells & Aspose.Cells.GridWeb assemblies in it. Unfortunately, I am unable to replicate this problem therefore the problem seems to be related to the specific version that you are currently using. I would suggest you to try the case with latest version (link shared in Shakeel’s response). In case the problem persists, please provide us the sample application along with referenced assemblies for thorough investigation.