dimanche 26 avril 2015

Can't load assembly libphonenumber Version=5.0.0.0 on Windows Phone 8.0


  1. I add libphonenumber library C# port with nuget to Windows Phone 8.0 project.
  2. Write code
  3. Run, then app crash on this Line _phoneNumberUtil = PhoneNumberUtil.GetInstance(); With this error

Could not load file or assembly 'libphonenumber_csharp_portable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.

Please, help me! What I doing wrong?

public partial class EnterPage
{
    private readonly EnterPageViewModel _viewModel;
    private readonly PhoneNumberUtil _phoneNumberUtil;
    public EnterPage()
    {
        InitializeComponent();
        _viewModel = new EnterPageViewModel();
        DataContext = _viewModel;
        _phoneNumberUtil = PhoneNumberUtil.GetInstance();
    }
}

In Windows Phone 8.1 project this code run without any errors.


Aucun commentaire:

Enregistrer un commentaire