无法在 Rider 中使用 .NET Standard 2.0 Lib 加载 Xamarin Forms 项目 [英] Failed to load Xamarin Forms project with .NET Standard 2.0 Lib in Rider

查看:33
本文介绍了无法在 Rider 中使用 .NET Standard 2.0 Lib 加载 Xamarin Forms 项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

TL;博士;Rider 是否支持带有 .NET Standard 库 2.0 的 Xamarin Forms 项目?

我使用空白表单应用程序多平台向导在 Visual Studio 2017.3 (Windows) 中创建了一个小型 Xamarin 项目.微软最近在 VS 的 Windows 版本中放弃了创建 PCL 的选项,仅提供 .NET Standard.因此我选择了那个.

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.

现在我想直接使用 Rider 在 Mac 上尝试开发,这样我就不必运行 Windows VM(我真的很喜欢 Resharper,所以我在 Mac 上绑定到 Windows)

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)

当我在 Mac OS 上的 Rider 中打开这个项目时,它抛出了一堆错误,看起来所有路径都搞砸了.另一方面,在 VS for 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.

然后我用 PCL 在 Mac 上的 VS 中创建了一个新的空白项目,Rider 毫无怨言地打开了它.所以我的问题:
Rider 是否支持带有 .NET Standard 库 2.0 的 Xamarin Forms 项目?

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?

  • 如果它们受到支持:我应该怎么做才能使其正常工作而不中断对 VS 的回退?
  • 如果没有:是否有计划在不久的将来支持它?

我的一些错误:

  • 加载失败:未找到导入的项目/usr/local/share/dotnet/sdk/2.0.3/Xamarin/Android/Xamarin.Android.CSharp.targets".确认声明中的路径正确,并且该文件存在于磁盘上.
  • 未找到 MSBuild 目标:确保已安装此解决方案中项目所需的所有 SDK,或在设置中指定不同的 MSBuild 版本.
  • 未找到 Xamarin.Android SDK:Rider 无法在此计算机上找到 Xamarin SDK.将不会加载基于 Xamarin 的项目.请安装 Xamarin SDK 或更改工具集
  • 无法从程序集/Users/kay/.nuget/packages/xamarin.forms/2.5.0.122203/build/netstandard1.0/Xamarin.Forms 加载Xamarin.Forms.Build.Tasks.GetTasksAbi"任务.Build.Tasks.dll.无法加载文件或程序集Microsoft.Build.Utilities.v4.0,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b03f5f7f11d50a3a".系统找不到指定的文件.

我想我可以开始手动修复路径等等,但我害怕做我没有深入了解的东西.我曾经使用 Unity 游戏引擎工作多年,但我是 Xamarin 开发的新手.

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.

推荐答案

转到文件 |设置 |构建、执行、部署 |工具集和构建并从单声道更改 MsBuild.我猜您已经在该 msbuild 中安装了所有 Xamarin 目标.

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.

这篇关于无法在 Rider 中使用 .NET Standard 2.0 Lib 加载 Xamarin Forms 项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆