Free Support Forum - aspose.com

Using Multiple Aspose Products in the same project

Please begin testing your releases in projects where they are all referenced.

I’ve run into many instances where multiple products don’t like to be referenced in the same project.

For instance I get the following error using Aspose.Imaging and Aspose.CAD in the same project:
The type ‘Image’ exists in both ‘Aspose.CAD, Version=20.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’ and ‘Aspose.Imaging, Version=20.8.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56’|

I have both these statements in my code…
if (!Aspose.Imaging.Image.CanLoad(FilePath))
throw new Exception(Properties.Resources.ImageFileError);
and
Aspose.CAD.Image CADDoc = Aspose.CAD.Image.Load(FilePath);

@Mitsobar,
We recommend you to kindly use fully qualified naming for creating objects for Aspose APIs (there might be some members (classes, methods, etc.) with similar names in different products, so it is better to use fully qualified names for the objects, etc.). If issue exists then share your sample project for our analysis.

I am using fully qualified names. I included the ones specific to the error I’m getting.

@Mitsobar,

We appreciate if you could create a sample console application (runnable), zip the project and post us to reproduce the issue, we will check it soon. Please exclude Aspose Dll to minimize the size of the project.

PS. please use Upload button (while replying) to upload the project.

@Mitsobar

This is already a known issue and has been reported in our issue tracking system with ID CADNET-1209 for resolution. We request for your patience and will notify you once the issue will be fixed.

A fix sooner rather than later sure would be nice.