I have been trying to evaluate GroupDocs.Merger on Visual Studio For Mac 2019, by adding GroupDocs.Merger (latest stable 20.5.0) via NuGet Package Manager.
I intend to use the GroupDocs .net APIs on macOS.
Here are the issues that I’m facing when trying it in a Mac app:
- Solution->Target Framework->Xamarin.Mac Modern. When trying to install, it asks to install the list of dependencies. When I click agree to move forward, One of the dependency i.e. Mono.Posix.NETStandard.1.0.0 is not installed by Nuget. The following is the error in the Package Console:
“Could not install package ‘Mono.Posix.NETStandard 1.0.0’. You are trying to install this package into a project that targets ‘Xamarin.Mac,Version=v2.0’, but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.”
Since it cannot be installed, this is out of the way.
- Solution->Target Framework->Xamarin.Mac Full (.NET framework 4.5). Only 4.5 works as in any other version the References in the project namely “System”, “System.Core” and “Xamarin.Mac” are indicating in Red color.
In this case, GroupdDocs.Merger is added successfully via Nuget.
Using your example code I tried the following code:
string firstDocPath = @"/Users/navneet/Desktop/1.docx"; // word file from Office 365 for windows, same happens when using word file from office 365 for Mac
string secondDocPath = @"/Users/navneet/Desktop/2.docx"; // word file from Office 365 for windows, same happens when using word file from office 365 for Mac
string outputPath = @"/Users/navneet/Desktop/1-result.docx";
Console.WriteLine(System.IO.File.Exists(firstDocPath));// writes True in console
Console.WriteLine(System.IO.File.Exists(secondDocPath));// writes True in console
// Join two documents and save into result.docx.
using (Merger merger = new Merger(firstDocPath))// Fails here with exception thrown, please see details below
The System.IO.FileNotFoundException is thrown stating the file Aspose.cells is not found.
Please also refer this link on your forums, where we have same type of issue with Group Docs Conversion. Document conversion API for Mac OS using .NET
To which your response is as follows: “We have logged this issue with ticket ID CONVERSIONNET-3974 for further investigation. As there’s any
update, you’ll be notified.”