All Collections
Build
Xamarin
Xamarin build fails with: The "WriteRestoreGraphTask" task failed unexpectedly
Xamarin build fails with: The "WriteRestoreGraphTask" task failed unexpectedly
Jihye E avatar
Written by Jihye E
Updated over a week ago

This can occur if your solution contains PCL and/or older .NET Standard projects together with newer .NET Standard projects. PackageTargetFallback has been deprecated and replaced with AssetTargetFallback resulting in a nuget restore failure. 

In your .csproj you should see this line:

<PackageTargetFallback>$(PackageTargetFallback);portable-net45+win8+wp8+wpa81;</PackageTargetFallback>

You can likely just delete it but if you are still running into build failures, you can also rename it as referenced below:

<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
Did this answer your question?