We're sorry GroupDocs doesn't work properply without JavaScript enabled.

Free Support Forum - groupdocs.com

Compile issues (Xamarin.Forms)

I opened a private ticket but I am hoping someone else can help me here.
Im using GD.Viewer 22.1.1 with VS2019 and Xamarin.Forms. When I go to compile the project screams about a bunch of other Aspose assemblies missing references. Has anyone encountered this? If so, how the hell do you fix it? Ive been stuck on this for over a week.

Brian

@brianphilips

I’m sorry for the delayed response. Please check the provided solution at Document Viewer .NET API on Mac OS. In general, you have to add packages for all the Aspose libraries. I’m reattaching the files listed in that topic:

Please let us know if it works for you.

Thank you I will take a look see at this in the coming days. I am really hoping to get past this hurdle. My only other option is to offload the viewer library in the cloud and I am really trying to avoid that.

@brianphilips

Sure, please let us know if managed to solve the issue. In case it still not working please do attach your the sample application and we’ll try to assist you.

so I looked at the project and did the same as suggested in the attachments. I am now getting the following error:

2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(254,3): error MT2002: Failed to resolve “Aspose.Cells.Rendering.ImageOrPrintOptions” reference from “Aspose.Cells, Version=21.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56”

Environment:

Microsoft Visual Studio Community 2022
Version 17.0.5
VisualStudio.17.Release/17.0.5+32112.339
Microsoft .NET Framework
Version 4.8.04084

Installed Version: Community

.NET Core Debugging with WSL 1.0
.NET Core Debugging with WSL

ASP.NET and Web Tools 2019 17.0.795.42246
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019 17.0.795.42246
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 17.0.795.42246
Azure App Service Tools v3.0.0

Azure Functions and Web Jobs Tools 17.0.795.42246
Azure Functions and Web Jobs Tools

C# Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 2.1.134+45632ee938.RR
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers 1.2
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Mono Debugging for Visual Studio 17.0.11 (54f19d2)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 6.0.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Razor (ASP.NET Core) 17.0.0.2156603+e9cd763349a080127b6519ffbec0123949a4c385
Provides languages services for ASP.NET Core Razor.

SQL Server Data Tools 17.0.62110.20190
Microsoft SQL Server Data Tools

TypeScript Tools 17.0.1001.2002
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 4.0.1-1.21568.1+6ab6601178d9fba8c680b56934cd1742e0816bff
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 17.0.0-beta.21522.2+6d626ff0752a77d339f609b4d361787dc9ca93a5
Microsoft Visual F# Tools

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions 1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.

Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers

VisualStudio.DeviceLog 1.0
Information about my package

VisualStudio.Foo 1.0
Information about my package

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 17.0.0.343 (d17-0@fb07a17)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 17.0.0.183 (remotes/origin/d17-0@a351f0f1f)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 17.0.17 (9e779b0)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 12.1.0.5 (d17-0/6b0e6b2)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: c633fe9
Java.Interop: xamarin/java.interop/d17-0@febb1367
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.36.0@a575761
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-0@a5194e9

Xamarin.iOS and Xamarin.Mac SDK 15.4.0.0 (8fc41ae82)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

@brianphilips

Thank you for sharing the details. We’ll try reproducing the issue at our side and update you.

Vladimir,
Thank you. Here is a list of the packages I have installed for my project so you are 1 to 1.

<ItemGroup>
<PackageReference Include="Aspose.BarCode" Version="21.12.0" />
<PackageReference Include="Aspose.CAD" Version="21.12.0" />
<PackageReference Include="Aspose.Cells" Version="22.1.0" />
<PackageReference Include="Aspose.Diagram" Version="22.1.0" />
<PackageReference Include="Aspose.Email" Version="21.12.0" />
<PackageReference Include="Aspose.Imaging" Version="21.12.0" />
<PackageReference Include="Aspose.Note" Version="22.1.0" />
<PackageReference Include="Aspose.PDF" Version="22.1.0" />
<PackageReference Include="Aspose.PSD" Version="22.1.0" />
<PackageReference Include="Aspose.Slides.NET" Version="22.1.0" />
<PackageReference Include="Aspose.Tasks" Version="22.1.0" />
<PackageReference Include="Aspose.Words" Version="22.1.0" />
<PackageReference Include="Aspose.Zip" Version="22.1.0" />
<PackageReference Include="GroupDocs.Viewer" Version="22.1.1" />
<PackageReference Include="Microsoft.AppCenter" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.5.0" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.5.0" />
<PackageReference Include="Microsoft.Identity.Client" Version="4.40.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="RestSharp" Version="106.13.0" />
<PackageReference Include="SkiaSharp" Version="2.80.3" />
<PackageReference Include="SkiaSharp.Views.Forms" Version="2.80.3" />
<PackageReference Include="Syncfusion.Xamarin.Buttons" Version="19.4.0.43" />
<PackageReference Include="Syncfusion.Xamarin.SfPdfViewer" Version="19.4.0.43" />
<PackageReference Include="Syncfusion.Xamarin.SfTreeView" Version="19.4.0.43" />
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
<PackageReference Include="System.Security.AccessControl" Version="6.0.0" />
<PackageReference Include="System.Security.Cryptography.Pkcs" Version="6.0.0" />
<PackageReference Include="System.Security.Cryptography.Xml" Version="6.0.0" />
<PackageReference Include="System.Security.Principal.Windows" Version="5.0.0" />
<PackageReference Include="System.Text.Encoding.CodePages" Version="6.0.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2291" />  
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
1 Like

@brianphilips

The 21.1.1 version is using the following package versions

<PackageReference Include="Aspose.BarCode">
  <Version>21.10.0</Version>
</PackageReference>
<PackageReference Include="Aspose.CAD">
  <Version>21.12.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Cells">
  <Version>21.12.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Diagram">
  <Version>21.10.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Email">
  <Version>21.6.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Imaging">
  <Version>21.12.0</Version>
</PackageReference>
<PackageReference Include="Aspose.PDF">
  <Version>22.1.0</Version>
</PackageReference>
<PackageReference Include="Aspose.PSD">
  <Version>22.1.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Slides.NET">
  <Version>21.2.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Tasks">
  <Version>21.10.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Words">
  <Version>22.1.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Zip">
  <Version>21.8.0</Version>
</PackageReference>
<PackageReference Include="Aspose.Note">
  <Version>21.1.0</Version>
</PackageReference>

It’s possible that the package versions should match.

Still getting this error after changing the versions. It appears to be an issue with linking.

2>C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(254,3): error MT2002: Failed to resolve “Aspose.Cells.Rendering.ImageOrPrintOptions” reference from “Aspose.Cells, Version=21.12.0.0, Culture=neutral, PublicKeyToken=716fcc553a201e56”

@brianphilips

Might you share your csproj file?

Sure no issue. I need to figure out how to attach them.

asbuiltgui_mobile.zip (3.0 KB)

@brianphilips

I successfully compiled and linked your projects with Visual Studio 2019. You tried to build in the Visual Studio 2022 Community right?

Might you try to build with Visual Studio 2019?
I try to reproduce your issue with Visual Studio 2022 Community.

@brianphilips
I can’t reproduce your issue with your csproj files, might you attach the complete project here?

I tried 19 and 22 and 17 for that matter. None of them would compile the Xamarin.Forms application against a mac. The issue was with mtouch linking the binaries. I have a windows forms project that compiles just fine.

Also when compiling are you doing this directly on a MAC or are you doing this on Windows connected to a mac? Im happy to setup a teams meeting if you would like to see what I see.

@brianphilips

I compiling in Windows Visual Studio, without MAC. As I understand you - the issue is present when you try to compile and deploy to MAC right?

@brianphilips

Unfortunately, it seems that there is no simple solution to this issue. We’ve tried to build a sample app that references GroupDocs.Viewer on MAC using Visual Studio for MAC but the build fails with the following error:

MTOUCH : error MT2001: Could not link assemblies. Reason: Value does not fall within the expected range.

While this solution has pros and cons it should definitely work.