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

Hello All,

I’m currently have the same issue but he separate project with the alias is not working. This is with Aspose.Words V 17.10.0.0 and Group Docs.Merger V 22.10.0.0, The issue arises when I try to set the license of the aspose words and it throws the error that the dll does not exist

@Haydenl

In case you can’t access the files from the previous comment, I’ve reuploaded them to Dropbox.

Hello @vladimir.litvinchik
I was able to set up the pictures and the project to match my current project but it was still unable to work
image.png (35.3 KB)
Did I miss anything here? On the license setting for Aspose words it still throws the unable to find version 17.10.0.0

@Haydenl

Can you please share a sample application that can be used to reproduce the issue?

I’m sorry for the late response theres been a lot of stuff going on. Yes I’ll upload a project when i can reproduce the issue on a separate application

@Haydenl

No problem. Will be waiting for your response.

@vladimir.litvinchik I have uploaded a sample project here sample project. I have reproduced the issue it throws the System IO File not found exception for the aspose version

@Haydenl

Please share the exception message. Thanks

@vladimir.litvinchik The exception message I see is this:image.png (67.0 KB)

@Haydenl

You can try fixing this issue by referencing Aspose.Words 22.7 instead of 17.10. Is it an option for you?

@vladimir.litvinchik unfortunately that is not an option for me, the license i have for aspose is only for 17.10

@Haydenl

Got it. The issue is under investigation. We’ll let you know if we have any updates.

Hello @vladimir.litvinchik is there an update to this or is it still under investigation?