Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider

孤人 提交于 2019-11-30 13:57:24

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!