I am trying to use libphonenumber-csharp library for my windows phone project for validating international phone numbers. I have installed the library using the following command on nuget package manager console:
Install-Package libphonenumber-csharp
I am using the following click event handler to test the functionality of the library:
private void buttonCall_Click(object sender, RoutedEventArgs e)
{
String bdNumberStr = "0123456789";
PhoneNumbers.PhoneNumberUtil phoneUtil = PhoneNumbers.PhoneNumberUtil.GetInstance();
try
{
PhoneNumbers.PhoneNumber numberProto = phoneUtil.Parse(bdNumberStr, "BD");
}
catch (PhoneNumbers.NumberParseException exc)
{
Debug.WriteLine("NumberParseException was thrown: " + exc.Message);
}
}
The program is crashing after clicking the button. The event handler function is not getting hit and an exception is thrown. In output window it says something like the following:-
Loaded 'C:\Data\Programs{60688B3F-2E3D-46EE-B0DE-C1F3E22F0912}\Install\PhoneNumbers.DLL'. Cannot find or open the PDB file.
Does anyone have an idea whats going wrong here?
You can't use this package, this library built for desktops, not for Windows Phone or Store apps. You need to port it by yourself or find another solution.