Free Support Forum - groupdocs.com

GroupDocs.Viewer and Aspose dlls conflict when used in same Project

Hello,


We have been using Aspose.Words, Aspose.Pdf etc dlls till now for some conversion and document generation related features. Now we have added GroupDocs.Viewer dll file under the same subproject where these dlls are already referenced and being used. We are getting an exception when trying to use an existing feature which was using referenced Aspose dlls and the exception error message says “Could not load assembly Aspose.Pdf”.
GroupDocs.Viewer is 3.5.0.0
and Aspose.Pdf version is 14.3.0.0

What I would like to understand is are there compatibility issue between which versions of GroupDocs dlls and Aspose dlls are being used in the same project?

Hi Pushpendra,


Thanks for using GroupDocs.Viewer for .NET.

We have tested to integrate the latest versions of GroupDocs.Viewer for .NET and Aspose.Pdf for .NET in the same application and both are working fine without any compatibility issues. Can you please provide us some sample application to reproduce the issue at our end? Furthermore, you are using quite older versions of the APIs. We recommend you to upgrade to the latest versions for a better experience.

Looking forward to your response.

Warm Regards

Hi Usman,


We have been using Aspose dlls from almost 3 years, We have not updated them since then and it is doing the job for us. Versions of Aspose dlls are
Aspose.Cells - 8.0.0.0
Aspose.Email - 4.0.0.0
Aspose.Imaging - 2.3.0.0
Aspose.Pdf - 9.1.0.0
Aspose.Slides - 14.2.0.0
Aspose.Words - 14.3.0.0
We are now trying to use GroupDocs.Viewer dll version 17.4.0.0 in the same project where the above mentioned Aspose assemblies are referenced and used in the code. The code which uses these Aspose assemblies never executes. I looked in the Visual Studio Assembly explorer and found out that GroupDocs.Viewer dll uses very recent versions of Aspose and visual studio during the assembly resolution is picking up the higher versions of Aspose dlls made available by GroupDocs.Viewer dll and thus making the actual referenced Aspose assemblies by us unavailable. We couldn’t use higher version of Aspose dlls as our license doesn’t support that.
Could you help me figure out way for this. We have to use them both Aspose and GroupDocs dlls in the same project.

Thanks,
Pushpendra

Hi Pushpendra,


Thanks for providing the detailed information.

Yes, GroupDocs.Viewer for .NET uses most recent versions of the Aspose APIs. Can you please share if you get some exceptions when running the code which uses Aspose APIs? Furthermore, to check the issue at our end, we created a sample console application referencing GroupDocs.Viewer for .NET 17.4.0 and Aspose.Pdf for .NET 9.1.0. The application is rendering the document using the GroupDocs.Viewer API and creating the PDF document with tables using Aspose.Pdf API without any issue. Possibly, you might be using some of the methods that were supported by the version 9.1.0 (or earlier versions) but are updated/deprecated in the latest versions of the Aspose APIs. To tackle this situation, you can download the sample application (provided below) and include minimal source code (of some feature(s)) that is not getting executed in your application when adding reference of GroupDocs.Viewer for .NET. This will help us to reproduce the same behavior at our end. Currently, the provided sample application is creating a Pdf document with some tables in that using Aspose.Pdf for .NET 9.1.0.


We shall be looking forward to your response.

Warm Regards

Hello Usman,


Your Sample Application turned out to be really helpful for me in figuring out the issue. The Sample Application did work for me in the first place.

I have done some modifications in the application. You would be finding a new DemoLibrary Project with code AddTable() and RenderAsHtml() moved to a new class DemoClass inside this project and Aspose.Pdf and GroupDocs.Viewer assemblies referenced in DemoLibrary. DemoLibrary assembly is then referenced in SampleTest. When you run this application it would break while executing the AddTable() method and a warning would be displaying in the last second line of the build output.

The solution is breaking as during the compilation of SampleTest Project, all the dependent assemblies of DemoLibrary along with DemoLibrary Assembly is getting copied to SampleTest bin except Aspose.Pdf dll as a higher version of Aspose.Pdf dll was made available to VS compiler by GroupDocs.Viewer thus making any code which was using older version of Aspose.Pdf unavailable.

You could try adding Aspose.Pdf dll to SampleTest Project, it should then work.

Thanks,
Pushpendra

Hi Pushpendra,


Thanks for providing the required source code.

We have successfully reproduced the issue at our end and logged it in our Issue Tracking System. We shall further investigate this issue and keep you informed in case of any updates related to this issue.

Warm Regards

Hi Pushpendra,


Thanks for being patient.

As a workaround, please try adding the alias for Aspose.Pdf reference in DemoLibrary project as shown in this screenshot. Furthermore, for a complete demonstration, please download this application and share your feedback with us. Hope it helps.

Warm Regards