The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task was not loaded from the assembly

2

This is the error I'm catching:

  

C: \ my_path \ packages \ Xamarin.Forms.2.5.0.122203 \ build \ portable-win + net45 + wp80 + win81 + wpa81 \ Xamarin.Forms.Build.Tasks.dll.   Confirm that the statement is correct, if the assembly is   all its dependencies are available, and if the task contains a   public class that implements Microsoft.Build.Framework.ITask.

Below the xaml.cs source code

[XamlCompilation(XamlCompilationOptions.Compile)]
    public partial class LoginPage : ContentPage
    {
        public LoginPage ()
        {
            InitializeComponent ();
        }

        public  void Login_Clicked(object sender, EventArgs e)
        {
            LoginService svc = new LoginService();
            LoginRS res = svc.Login(txtUsuario.Text, txtSenha.Text);
            if (res != null && res.Success  )
            {
                App.LooggedUser = res;

                Application.Current.MainPage = new MainPage();
            }
            else if(res != null && ! res.Success)
            {
                lblErroLogin.Text = res.Exception;
            }
            else
            {
                lblErroLogin.Text = "Não foi possível realizar o Login, por favor verifique sua conexão com a Internet";
            }
        }
    }

Before I was giving the error below in InitializeComponent

  Unhandled Exception: System.TypeLoadException: Could not resolve type   with token 01000043 (from typeref, class / assembly   Xamarin.Forms.Internals.ResourceLoader, Xamarin.Forms.Core,   Version = 2.0.0.0, Culture = neutral, PublicKeyToken = null) occurred

How do I resolve this problem?

    
asked by anonymous 15.01.2018 / 21:52

2 answers

2

Error MSB4062: The task "Xamarin.Forms.Build.Tasks.GetTasksAbi" could not be loaded from the assembly

Hello.

I solved my problem by mounting the project (file-to-file) and compiling and managing to keep up with the problem.

A solution library required the Microsoft.Bcl.Build package in the referencing project (the application in my case).

I just installed the package via nuget and everything is fine ...

I hope this helps.

    
05.02.2018 / 01:28
0

Two indispensable things to do using Xamarin in case of problems:

  • Clean the solution.
  • Restart Visual Studio.
  • 11.07.2018 / 04:24