Master Slides Are Not Equal after Being Inserted into a Presentation as Clones in C#

Hi there

I’m facing a strange issue that does not make sense to me.

When I clone a MasterSlide from one presentation to another the Equals method does not recognize them as being the same:

using (Presentation presentationSlideMain = new Presentation(prensetationPath))
{
    using (Presentation presentationSlide2 = new Presentation(slide2Path))
    {
        var test2 = presentationSlideMain.Masters[0].Equals(presentationSlide2.Masters[0]); // return false
        presentationSlideMain.Masters.InsertClone(0, presentationSlide2.Masters[0]);
        var test3 = presentationSlideMain.Masters[0].Equals(presentationSlide2.Masters[0]); // return false as well
    }
}

Can there be a good reason for this? Maybe something with the presentation document properties or similar?

@ahthomsen,
Thank you for your question.

Please check your results using the latest version of Aspose.Slides if it is possible. The Equals method should compare slides by content. If the issue persists, please share the following data and information:

  • presentation files
  • OS version where the code was executed
  • .NET target platform in your app
  • Aspose.Slides version you used

Hi there

Thanks for getting back to me

I used Apose.Slides .Net 22.5

Link for first file:
https://docs.google.com/presentation/d/1VbZ6-oRvM5Y5FQy3KyC5tXoKA3VRA0WB/edit?usp=sharing&ouid=107504824383276107804&rtpof=true&sd=true

Link for 2nd file:
https://docs.google.com/presentation/d/119a6rDqJ6OAWakZV-1ihDCK-iFTPjp0p/edit?usp=sharing&ouid=107504824383276107804&rtpof=true&sd=true

OS: Windows 11 - running ISS server locally (same issue on production server running Windows Server on AWS)

.NET platform is 3.1 core

Let me know if you need more

best regards
Anders

@ahthomsen,
Thank you for the additional information. I’ve reproduced the problem with comparing slide masters and added a ticket with ID SLIDESNET-43237 to our issue tracking system. We apologize for any inconvenience. Our development team will investigate this case. You will be notified when the issue is resolved.

The issues you found earlier (filed as SLIDESNET-43237) have been fixed in Aspose.Slides for .NET 23.7 (ZIP, MSI).
You can check all fixes on the Release Notes page.
You can also find the latest version of our library on the Product Download page.