Xamarin.Forms Nuget Dependencies error

I want to create a smartphone application(For Android and IOS ) with Xamarin and Plugin.BLE, but when I create the project it seems to be a problem while loading the dependencies

this is the error I get(Tried to upload a screenshoot but I can't):

Error MSB4062: The "Xamarin.Forms.Build.Tasks.XamlGTask" task could not be loaded from the assembly C:\Users\Patron.nuget\packages\xamarin.forms\3.2.0.839982\build\netstandard2.0\Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51' or one of its dependencies. The system cannot find the file specified. Confirm that the declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask. Test2 C:\Users\Patron.nuget\packages\xamarin.forms\3.2.0.839982\build\netstandard2.0\Xamarin.Forms.targets 70

and the dependencies have a Yellow Triangle

I have tried to reload the dependencies but nothing seems to work
I can't pass through this error, what could be the problem?

Best Answer

Answers

  • BillyLiuBillyLiu Member, Xamarin Team Xamurai

    @magergar

    Could you reproduce this issue in a new blank project?
    I think you could try to clean your project and delete bin and obj folders, then rebuild the project.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @BillyLiu said:
    @magergar

    Could you reproduce this issue in a new blank project?
    I think you could try to clean your project and delete bin and obj folders, then rebuild the project.

    Yes, this is the solution, many a times...

  • @BillyLiu said:
    @magergar

    Could you reproduce this issue in a new blank project?
    I think you could try to clean your project and delete bin and obj folders, then rebuild the project.

    I have this problem with a Blank Project,
    I go to File>New >Project>Visual C#> Cross-Platform>Mobile App(Xamarin.Form)>Blank
    and this issue appears from the start. I tried to clean and rebuld the project as well as deleting the bin and obj Folders
    still no change

    @LuisDavidDelaCruz said:
    Hi @magergar, if problem keeps you can try downgrading the version of the package

    I Downgraded to Xamarin.Forms (2.5.1.527436) and this fix the problem. Now I can see the Welcome Screen.
    Thanks For all your responses

  • AliHusAliHus USMember

    I have the same problem with a new VS Xamarin Project. Really wanted to try the new Xamarin Forms 3.x with CSS support for a new company project. I have the same errors as above. For now downgrading all projects to 2.5 worked for me.

  • AliHusAliHus USMember

    After a windows update, .net 4.7.2 update, and a visual studio update, the latest version of Xamarin Forms 3.2 works! I also made sure all my projects point to the same version XF. I think the main issue was the Windows Update, my version was very outdated.

Sign In or Register to comment.