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

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

问题描述

TL; DR; Rider是否支持具有.NET Standard库2.0的Xamarin Forms项目?

我使用Visual Studio 2017.3(Windows)创建了一个小型Xamarin项目空白表格应用程序多平台向导。 Microsoft最近放弃了在Windows版本的VS中创建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.

然后我在PC上的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加载 Xamarin.Forms.Build.Tasks.GetTasksAbi任务。表格/2.5.0.122203/build/netstandard1.0/Xamarin.Forms.Build.Tasks.dll。无法加载文件或程序集 Microsoft.Build.Utilities.v4.0,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b03f5f7f11d50a3a。系统找不到指定的文件。

  • 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 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.

推荐答案

转到文件| | | | | | | | | | | | | | | |上一页下一页设置|构建,执行,部署|工具集和从mono构建和更改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天全站免登陆