Aspose.Tasks 23.5+ breaks compilation due to Aspose.Drawing overriding system types

Hi

Following up on Conflicts with other Aspose products - #15 by amjad.sahi.

We are in the process of upgrading our Aspose components in a big eco-system.

When we upgrade and start using Aspose.Tasks 23.5+ our solution will no longer compile.

Attached is a very small sample project reproducing the issue.

AsposeTaskDrawingMessup.zip (1.7 KB)

Using Aspose.Tasks 23.4 it is compiling. Upgrading Nuget reference to Aspose.Tasks 23.5 it breaks.

It breaks due to Aspose.Tasks 23.5 is using Aspose.Drawing 22.12 - which has some problems with duplicating types in System.Drawing namespace.

The project builds to both .Net48 and Net6.0-window TFM.

Our hierarchy is a package DocumentUtilities that uses Aspose directly.
This package is then included in several other solutions, and summing up we have millions line of code. Some running .Net48 when built, some targeting net6.0-windows.

We need a solution to move forward.

Extern alias or other solutions that needs us to go through all products that depends on DocumentUtilities needs to have a large extent of files edited is not a solution.

We have encapsulated Aspose this way, to ensure it was disconnected from being directly used in the other packages/products.

Please let me know how to solve this problem. Reading other threads it seems the problem has been solved for other packages in the Aspose suite - but then/still introduced in Aspose.Tasks.

Best regards
/Anders

@licenselogimatic,
thank you for the detailed description of the problem.

Yes we know about the problem.
Version of Aspose.Tasks targeting .net6.0 uses Aspose.Drawing while other packages (for example, targeting netstandard2.0) use System.Drawing.

We will address this issue in a future release. We consider release of version targeting .net6.0-windows which doesn’t reference Aspose.Drawing.

Hi

Sound good. For now we will use Apose.Tasks 23.4 then.

There should be no problem in using e.g. version. 23.7 of the other Aspose assemblies, and 23.4 of Aspose.Task in the same application right?

Or do you have some cross-assembly calls that we might encounter so using a mix of versions is unrecommended?

/Anders

@licenselogimatic,

there should be no cross-assembly calls in case of version targeting .net6.0-windows.

@licenselogimatic,

We included version targeting .net6.0-windows in our latest release.
As discussed above, the version depends on System.Drawing instead of Aspose.Drawing.

Could you check it?

Release Notes can be found here

Hi
I have just updated to 23.9 and it seems to compile and run our unit tests fine now.

Thanks for the effort.

/Anders

1 Like