Aspose: Aspose.Words .NET (version 21.8.0)
Platforms: Xamarin.iOS, Xamarin.Android, & Xamarin.Forms (iOS & Android)
Build Config: Linking set to
Link Framework SDKs Only
SetLicense() the following error is thrown. It works fine when set to
**System.TypeLoadException:** 'Cannot load type 'System.IDisposable, netstandard, Version=22.214.171.124, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'.'
aspose-idisposable-error.PNG (11.3 KB)
- Our license file is stored as an embedded resource in the Xamarin.iOS or Xamarin.Android native projects.
- Microsoft.Win32.Registry.dll may be the culprit. It is also causing compile-time linking errors (which we worked around by adding the
--dlsym:Microsoft.Win32.Registry.dll mtouch arg).
- With SDK Linking enabled, a couple artifacts were missing and we needed to add them to the linker config to force inclusion (XmlDocument.GetElementsByTagName() & Assembly.GetEntryAssembly())
We also setup a small sample project with only Xamarin and Aspose,Words packages to reproduce this issue and ensure nothing else was interfering. I can recreate the issue by simply adding Aspose.Words & the license file to a Xamarin project, then calling