Make sure that GroupDocs.Comparison has been installed properly before running examples.
We offer multiple solutions on how you can run GroupDocs.Comparison examples, by building your own or using our back-end or front-end examples out-of-the-box.
Please choose one from the following list:
Build project from scratch
Open Visual Studio and navigate to File -> New -> Project.
Select the appropriate project type - Console App, ASP.NET Web Application etc.
Install GroupDocs.Comparison for .NET from Nuget or official GroupDocs website following the guide.
Develop your first application with GroupDocs.Comparison for .NET like shown below:
stringsourceDocumentPath=@"C:\source.docx";// NOTE: Put here actual path to source documentstringtargetDocumentPath=@"C:\target.docx";// NOTE: Put here actual path to source documentstringoutputPath=@"C:\result.docx";// NOTE: Put here actual path to source documentusing(Comparercomparer=newComparer(sourceDocumentPath)){comparer.Add(targetDocumentPath);comparer.Compare(outputPath);}
Build and run your project.
Check the rendered document pages at path specified in the “outputPath” parameter.
Run back-end examples
The GitHub hosts the complete GroupDocs.Comparison examples package. You can either download the ZIP file or clone the GitHub repository using your favorite git client. If you download the ZIP file, extract it content to your local disk. The extracted files and folders will look as follows:
In extracted files and folders, you can find CSharp solution file. The project is created using Visual Studio 2019. The Resources folder contains all the sample document and image files used in the examples. To run the examples, open the solution file in Visual Studio and build the project. To add missing references of GroupDocs.Comparison see the installation guide. The RunExamples.cs calls all the functions.
Uncomment the function to run and comment the rest.
Open solution in the VisualStudio. Update common parameters in web.config and example related properties in the configuration.yml to meet your requirements.
Open solution in the VisualStudio. Update common parameters in web.config and example related properties in the configuration.yml to meet your requirements.
Use the Docker image to try GroupDocs.Comparison for .NET features in an easy way. Execute the following commands to run GroupDocs.Comparison for .NET from docker image:
mkdirDocumentSamplesmkdirLicensesdockerrun-p8080:8080--envapplication.hostAddress=localhost-v`pwd`/DocumentSamples:/home/groupdocs/app/DocumentSamples-v`pwd`/Licenses:/home/groupdocs/app/Licensesgroupdocs/comparison## Open http://localhost:8080/comparison in your favorite browser.
Contribute
If you like to add or improve an example, we encourage you to contribute to the project. All examples in this repository are open source and can be freely used in your own applications. To contribute, you can fork the repository, edit the code and create a pull request. We will review the changes and include it in the repository if found helpful.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.