Failed to load Xamarin project with .NET Standard Lib

Answered

I created a small Xamarin project in Visual Studio 2017.3 (Windows) using the blank forms app multiplatform wizard. Microsoft dropped the the option to create a PCL recently in the Windows version of VS and provides .NET Standard only. Thus I selected that one.

Now I wanted to try out development on Mac directly using Rider so that I don't have to run a Windows VM (I really like Resharper so I am bound to Windows on my Mac)

When I open this project in Rider on Mac OS, it throws a bunch of errors and it looks like all paths are messed up. Opening it in VS for Mac works fine on the other hand.

I then created a new blank project in VS on Mac with PCL and Rider opens it without complaining. So my Questions is if Xamarin Forms projects with .NET Standard library are not yet supported in Rider?

If they are supported: What am I supposed to do to make it work without breaking the fallback to VS?

If not: Are there any plans to support it in the near future?

Some of my Errors:

  • load failed: The imported project "/usr/local/share/dotnet/sdk/2.0.3/Xamarin/Android/Xamarin.Android.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
  • MSBuild targets were not found: Make sure that all SDKs required for projects in this solution are installed, or specify a different MSBuild version in settings.
  • Xamarin.Android SDK was not found: Rider was unable to find Xamarin SDK on this machine. Xamarin-based projects will not be loaded. Please install Xamarin SDK or change toolset
  • The "Xamarin.Forms.Build.Tasks.GetTasksAbi" task could not be loaded from the assembly /Users/kay/.nuget/packages/xamarin.forms/2.5.0.122203/build/netstandard1.0/Xamarin.Forms.Build.Tasks.dll. Could not load file or assembly 'Microsoft.Build.Utilities.v4.0, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.

I think I could start fixing the paths and so on manually, but I am afraid of doing stuff that I don't undersatnd in depth. I used to work with Unity game engine for years but I am new in Xamarin development.

1 comment
Comment actions Permalink

https://stackoverflow.com/questions/48628318/failed-to-load-xamarin-forms-project-with-net-standard-2-0-lib-in-rider solved the problem. Seems to be important to restart Rider and not only reload the solution.

1

Please sign in to leave a comment.