0

So i'm kind of new to programming but i started using Xamarin and i tried to add NHunspell package from NuGet on Xamarin Studio, it downloads it and the .dlls appear in Resources and NHunspell appear in Packets, but it doesn't appear in References and so when i try "using NHunspell" it doesn't work. I have tried running the "install" script with Power Shell but apparently nothing changed.

How do I add NHunspell to my project?

CrazyCasta
  • 26,917
  • 4
  • 45
  • 72

2 Answers2

1

Not every .NET library is compatible with Xamarin. They generally have to be either built against the appropriate Xamarin Framework, or build using a compatible PCL Profile.

scan.xamarin.com can tell you if a given DLL is compatible or not.

Jason
  • 86,222
  • 15
  • 131
  • 146
  • I don't understand, i put in "Hunspellx64.dll" and the scan said 0%, then i put "NHunspell.dll" and it returned 90% (still dunno what that means). These are the dll's that come when i install via NuGet. Does this mean i simply cannot run the NHunspell on Xamarin? – Vinicius Peres França Feb 07 '15 at 02:59
  • it means it is using code that is not present in the Xamarin version of the Framework - the scan tool should tell you fairly explicitly which classes are causing problems. NHunspell is open source, so you could fork it and try to build your own Xamarin compatible version. – Jason Feb 07 '15 at 03:05
  • Well if xamarin can't use the stuff i need, what can i do? Could i do it on VS? I absolutely need hunspell. – Vinicius Peres França Feb 07 '15 at 04:05
  • I just told you what you can do - make your own Xamarin compatible fork. Or find a different tool that is compatible. Or pick a different platform. Or ask the NHunspell maintainers if they intend to support Xamarin. – Jason Feb 07 '15 at 04:16
  • Like i said, i'm new into this, i don't even know what "fork" is. Thanks for your help, i guess i'll have to find another way then. – Vinicius Peres França Feb 07 '15 at 04:35
1

As I answered you already per Email the problem with NHunspell is that it is in fact an wrapper to Hunspell. Hunspell is written in c or C++ so it compiles to a native Dll. At this time the build produces two native DLLs for Windows 32 Bit and 64Bit. It would be necessary to produce native DLLs for ARM / Android or Linux or ... to use it on these platforms. I will do this for X86/X64 Linux in the future. But at the moment I'm snowed under so there is no timeframe. If you or someone else is willing to contribute, you're welcome.

BTW. NHunspell has an resolver for the correct native DLL. If your project has the native DLLs in the output directory, it resolves X86 or x64 in windows. You can do this in Xamarin studio by adding the native DLLs in your project and configure "copy to output directory". But this works only in Windows.

The latest packages (without NuGet) are here: http://download.crawler-lib.net/NHunspell/

Thomas Maierhofer
  • 2,665
  • 18
  • 33
  • sorry to bother you again but can you check this question please? ty very much : http://stackoverflow.com/questions/42566916/how-to-obtain-all-possible-words-from-given-hunspell-dictionary – Furkan Gözükara Mar 02 '17 at 23:10