Free Support Forum - groupdocs.com

Return null value when we integrating groupdocs Compare with my existing Application Getting result as Null


#1

Returns null value when we are integrating groupdocs Compare with my existing Application Getting result as Null with comparison.Compare(

we have tried with Fresh project, with same code their it is working fine.

Is there any prerequisites for this like Framework version/ any dll conflicts /Licence /etc…

Find the code

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace Myproject.Models.DALLayer.Compare
{
public class Compare
{
    public void Getcomp()
    {
        GroupDocs.Comparison.Common.License.License license = new 
        GroupDocs.Comparison.Common.License.License();
        license.SetLicense("GroupDocs.Comparison.lic");
        // Get an instance of GroupDocs.Comparison.Comparer and call method Compare.
        GroupDocs.Comparison.Comparer comparison = new GroupDocs.Comparison.Comparer();
        GroupDocs.Comparison.Common.ICompareResult result = comparison.Compare(@"D:\GroupDocsTesting\1.docx", @"D:\GroupDocsTesting\2.docx", new GroupDocs.Comparison.Common.ComparisonSettings.ComparisonSettings());

        // save result document to a file.
        result.SaveDocument(@"D:\GroupDocsTesting\3.docx");
    }
  }
}

#2

@kranthireddyr,

Thank you for your inquiry.
GroupDocs.Conversion supports .NET framework starting from V2.0. See details here.
Secondly, API doesn’t rely on any third-part tool. Please make sure that your license is valid and it is properly applied/loaded in your existing application. If license is not properly loaded, you may face evaluation limitation.
However, in order to further investigate this issue, we need following details from you:

  • API version that you integrated in the project
  • A demo project using that issue could be reproduced
  • Problematic file

#3

Hi atirtahir3,

Thanks for your reply

we are facing this issue when we are using both Aspose.Words and GroupDocs.Comparison in same project

Comparison works fine when we remove the Aspose.Words from the project. But we have already implemented a lot functionality using Aspose.Words. we want to implement GroupDocs.Comparison dll in the same project. we are using 16.4.0.0 version of Aspose.Words and 19.1.0.0 version of GroupDocs.Comparison.

Please provide solution to use both dll in same project. for future investigation attaching sample project that have problem.


#4

@kranthireddyr,

We could not reproduce this issue at our end using both APIs (together in a application) with their specified versions.

Can you please reattach the sample project along-with problematic files (source and target)?


#5

Hi

We are unable to attach the sample project to post.it is showing attachment is uploaded but not appearing in the post.Is there any size limitation.

Our sample project size is 230 MB.


#6

@kranthireddyr,

Please upload the sample project on some cloud storage (Google Drive or Dropbox) and share link with us. We’d recommend you to share a simplified (without any third-party dependencies) application along-with steps to run/compile it.


#7

thanks @atirtahir3 for your reply.

we have uploaded project into following link GroupDocs

Steps to run solution:

  • Unzip and open solution file(project in MVC architecture )

  • In Home Controller we have written code for GroupDocs.Comparison

  • In Documents folder we have placed target and source files. same folder we are saving result document after comparison

  • If we remove Aspose.Words from the solution following code return a value

ICompareResult result = comparison.Compare(Path.Combine(DocumentsPath,“new.docx”), Path.Combine(DocumentsPath, “old.docx”), objComparisonSettings);

but,when we add Aspose.Words to project then above code will return null


#8

@kranthireddyr,

Unfortunately, we cannot access the document. Please share a publicly accessible link with us. You may use Google dive or Dropbox for this purpose.


#9

Hi @atirtahir3,

we have uploaded project file into following link Group Docs

Steps to run solution:

  • Unzip and open solution file(project in MVC architecture )
  • In Home Controller we have written code for GroupDocs.Comparison
  • In Documents folder we have placed target and source files. same folder we are saving result document after comparison
  • If we remove Aspose.Words from the solution following code return a value

ICompareResult result = comparison.Compare(Path.Combine(DocumentsPath,“new.docx”), Path.Combine(DocumentsPath, “old.docx”), objComparisonSettings);

but,when we add Aspose.Words to project then above code will return null


#10

@kranthireddyr,

Thanks for sharing the sample project.
Unfortunately, we are not able to reproduce this issue at our end. Please see the investigation summary- output.JPG (244.4 KB)

However, in order to further investigate this scenario, we need following information:

  • Do you face this issue each time when you run the project (or it occurs rarely/sometimes)?
  • Can you reproduce this issue in console application as well?