Free Support Forum - aspose.com

Aspose CAD 20.8 and Aspose.Imaging Naming Conflict

After installing Aspose.CAD 20.8, there is a naming conflict for Aspose.Imaging.Image & Aspose.Imaging.ImageOptions namespaces when referencing Aspose.CAD.dll and Aspose.Imaging.dll in the same project. Hence, the Aspose.Imaging library cannot be used when having both Aspose.CAD.dll and Aspose.Imaging.dll at the same time.
Downgrading Aspose.CAD to version 20.7 fixes this issue.

I am experiencing this too (logged at Type conflict in Aspose.CAD 20.8.1?)

@DigitusDev

I have tried using following project on my end and there is no issue. Can you please share the working sample project that is reproducing the issue on your end.
TestCADImaging.zip (15.4 KB)

Add the following to Program.cs to see the type conflict:

static void DoSomething(Aspose.Imaging.Image img)
{
    // Do stuff
}

Hello, below is a code sample that’s causing the issue when both Aspose.CAD and Aspose.Imaging libraries are referenced in the same project:

Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(FullPath);
Aspose.Imaging.ImageOptions.PngOptions saveOptions = new Aspose.Imaging.ImageOptions.PngOptions();
image.Save(FilePathDestination, saveOptions);

@ast3

I have been able to reproduce the issue on my end and an issue with ID CADNET-1209 has been created to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.