Is there a docentric nuget package that supports Xamarin forms for mobile development?
Docentric Support for Xamarin Forms
Docentric Toolkit report engine is built targeting .NET Framework 3.5 (or higher) and .NET Standard 2.0. Just reference the Nuget package from your Xamarin project: https://www.nuget.org/packages/DocentricToolkitEngine/
Best regards, Jure
Last edited 20 April 2022
Unfortunately I was unable to reference the Toolkit Engine DLL from a Xamarin project. The reference to Docentric.OpenXml has some Windows platform-dependent APIs from System.Drawing and System.IO.Packaging. Let me know if I am missing something. Thank You.
Thank you for the input. We will investigate and be back to you soon.
Could you please tell me exactly which Xamarin project exactly would you like to incorporate Docentric Engine into? Also, could you also share the error you are experiencing. Does the error occur when you try to add the Docentric nuget package, or during a build operation?
Hi Jure, === Mono Framework MDK === Runtime: Mono 18.104.22.168 (2020-02/adf1bc4335d) (64-bit) Package version: 612000174
=== NuGet === Version: 22.214.171.12434
=== Xamarin.Android === Version: 126.96.36.199 (Visual Studio Professional) SDK Tools Version: 26.1.1 SDK Platform Tools Version: 30.0.4 SDK Build Tools Version: 30.0.2
=== Xamarin.iOS === Version: 188.8.131.52 (Visual Studio Professional) Branch: xcode13.3
=== Xamarin.Forms === Version: 184.108.40.2066
The error happens during a build operation: iOS: MTOUCH: Error MT2002: Failed to resolve assembly: 'Docentric.OpenXml, Version=220.127.116.11, Culture=neutral, PublicKeyToken=c2a1f9cfb4f15acd' (MT2002)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Legacy.targets(5,5): Error XA2002: Can not resolve reference:
Docentric.OpenXml, referenced by
Docentric.Documents. Please add a NuGet package or assembly reference for
Docentric.OpenXml, or remove the reference to
Also possibly of note: I need to manually add package SixLabors.ImageSharp (2.1.0). If I don't, the build will end with an error similar to those above except it will say that SixLabors.ImageSharp is referenced by Docentric.Documents and cannot be found. I've also added a reference to package Microsoft.Windows.Compatibility (6.0) but that did not resolve the issue.
We were able to reproduce the issue in our environment. After studying the problem, we figured out that Xamarin has its own rules sometimes and it seems that the Xamarin compiler requires all dependencies present as normal references. The problem with the
Docentric.Documents assembly is that it has merged the two assemblies into it and this is what the Xamarin compiler doesn't want. At the moment, there is nothing we can do because we would need to make huge changes.
Still, the next major version of Docentric v7.0 has been reworked so that it doesn't have any embedded assemblies in the output assembly. This release is scheduled for later this year, most probably somewhere 2022 Q3/Q4.
Let me know if you would like to know more.
Best regards, Jure