TL;DR; Are Xamarin Forms projects with .NET Standard library 2.0 supported in Rider?
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 Question:
Are Xamarin Forms projects with .NET Standard library 2.0 supported in Rider?
Some of my Errors:
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.
Go to File | Settings | Build, Execution, Deployment | Toolset and Build and change MsBuild from mono. I guess you have all Xamarin targets installed in that msbuild.
The problem is caused by Rider selecting the wrong MSBuild file to use. The .NET Core SDK installs a version of MSBuild that isn't configured to use the Xamarin SDK.
In Rider goto File > Settings > Build, Execution Deployment > Toolset and Build > Use MSBuild version. Select the MSBuild.dll that does not reside in the .NET Core SDK path:
On Windows that will be under Microsoft Visual Studio on MacOS that appears to be under the Mono.framework.
It is important that you fully restart Rider after making this change. After making the change, Rider will try to do a rebuild and fail. Making it seem like your change didn't work. But it appears that the setting doesn't take effect until Rider is fully restarted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With