System.EntryPointNotFoundException when using aff file

By : paul590
Source: Stackoverflow.com
Question!

I have created a project where I take a word in and use the Hunspell.dll class to do a check spell. Please note I downloaded this dll from a package through the xamarin studio IDE. I also downloaded the .aff and .dic files needed for the class to check the word and added them to my debug folder but when I compile the application i get the following error: System.EntryPointNotFoundException. If you have any ideas please let me know.

This is my code:

using NHunspell;

public static void Main(string[] args)
{
    string line = Console.ReadLine();
    using (Hunspell hunspell = new Hunspell("en_us.aff", "en_us.dic"))
    {
        bool correct = hunspell.Spell(line);
        Console.WriteLine(line + " is spelled " + (correct ? "correct" : "not correct"));
    }    
}
By : paul590


Answers

Assuming you are using the NHunspell port of Hunspell. Very likely your native Hunspell library is not the desired one (a CPU architecture mismatch kind of thing.) This issues are very hard to diagnose without knowing your exact environment and the libraries you are using.

I have, however, tried your example by installing NHunspell with NuGet in Visual Studio and downloading the aff and dic files manually. It is working just fine. I suggest you better try installing NHunspell from NuGet. Xamarin Studio also supports NuGet package management. NuGet takes care of finding the proper native library for your environment, deploying them properly, etc.

Update: For Xamarin in platforms other than Windows.

NHunspell is a .NET wrapper around the Hunspell library that is written in C/C++. For NHunspell to work properly, there must be a build of the Hunspell library for that particular environment that NHunspell is able to invoke. Xamarin has nothing to do with that.

According to the NHunspell author, up to February 2015 there is no such build for non-Windows platforms. The last release of NHunspell appeared in March 2015. So it can be safely assumed that NHunspell is available only for Windows up to now. So even installing NHunspell with NuGet doesn't do any good.

I myself tried using NHunspell from MonoDevelop in Ubuntu 16.04. Installation was successful with NuGet, however, on run, I got exactly the same error: System.EntryPointNotFoundException. As MonoDevelop and Xamarin Studio uses the same .NET runtime (called Mono) so the same should be true for Xamarin.

By : f.nasim


To use @Input() in your component, you will have to import Input from core package like this-

import { Input } from '@angular/core';

Reference: https://angular.io/docs/ts/latest/cookbook/component-communication.html

See if this helps.

By : Sanket


You need a logical condition in the while. Perhaps

program.toUpperCase().equals("Y")
By : nicomp


This video can help you solving your question :)
By: admin