The task "Xamarin.Forms.Build.Tasks.Gettasksabi" was not loaded from Assembly

Asked

Viewed 1,026 times

2

That’s the mistake I’m taking:

C: meu_caminho 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 Assembly and all your dependencies are available and if the task contains a public class implementing Microsoft.Build.Framework.Itask.

Below the source code of xaml.Cs

[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 was giving 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 solve this problem?

2 answers

2

MSB4062 error: "Xamarin.Forms.Build.Tasks.Gettasksabi" task could not be loaded from Assembly

Hello.

I solved my problem by assembling the project (file-to-file) and compiling and managing to keep track of the problem.

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

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

I hope this helps.

0

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

  1. Clean up the solution.
  2. Restart Visual Studio.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.