We are encountering a strange situation in our conversion library built on top of your components.
We are trying to add conversion of CAD formats to PDF but we get the
Aspose.CAD.CadExceptions.ImageSaveException: Image export failed. —> System.IO.FileLoadException: Could not load file or assembly ‘Aspose.Pdf, Version=18.1.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ or one of its dependencies. The located assembly’s manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
error when trying to use this code https://github.com/aspose-cad/Aspose.CAD-for-.NET/blob/master/Examples/CSharp/DWG-Drawings/ExportToPDF.cs
Details:
The sample app in github will work for us for both .NET 4.0 and .NET 4.5.2
We are referencing Aspose.CAD version 18.3.0 from nuget
Out library also loads Aspose.PDF 18.4.1; exporting CAD formats to PDF when this library is referenced does not work
Our library will convert CAD to PDF correctly if we downgrade Aspose.PDF component to version 18.1.0 (just as the exception is suggesting)
We would like to keep Aspose.PDF to the latest version and have CAD conversion to PDF in place.
Is there anything we can do to tweak the code to make it work with Aspose.PDF 18.4.1?
We are sorry for your inconvenience. We are already looking into this issue and a ticket ID CADNET-563 has already been logged in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that we may share notification with you once issue will be resolved.
I have tested Apsose.CAD 18.3 and Aspose.PDF 18.4.1 together in attached sample project and there seems to be no issue. Can you please try using the same on your end.
I gave the tester app a try. It generate indeed a PNG without any issues. But we are trying to generate PDFs and that seems to need the Aspose.PDF package.
The test app you send does not require the Aspose.PDF at all. It is simply referenced there. Generating PDFs will actually use it and fail.
Just to remind the goal here, we are trying to have the latest of Aspose.PDF in our app since it comes with a lot of bug fixes that we need.
Thank you for sharing the feedback. Can you please share a sample project like I have shared with you that is reproducing issue on your end. I will link that with associated ticket so that we may address that when resolving the issue.
The attached code is referencing Aspose.PDF 18.5 and trying to convert a DWG to PDF will fail throwing the aforementioned error.
If you remove the Aspose.PDF reference in the app, conversion works as expected.
Just a quick reminder of what we are trying to accomplish here, we want to reference the latest of Aspose.CAD and Aspose.PDF in a library that will handle conversion of various file formats to PDF.
I regret to share that the issue specified is not yet resolved because issue is added recently in our issue tracking system. Actually, in Aspose.CAD forum the issues are selected for investigation on first come first serve basis. Also the first priority for scheduling and resolution is given to paid Enterprise and priority support customers. Then Aspose.CAD normal or free support customers issues are scheduled and resolved on first come and first come serve basis. I will share the further information with you as soon as the issue will be resolved.
I regret to share that at present there is no workaround that I may offer you. I suggest you to please wait till the time the product team investigate and resolve the issue.