正在尝试创建Xamarin.Forms macOS应用程序:名称';加载应用程序';在当前上下文中不存在

正在尝试创建Xamarin.Forms macOS应用程序:名称';加载应用程序';在当前上下文中不存在,xamarin.forms,xamarin.mac,Xamarin.forms,Xamarin.mac,我只是想创建一个Xamarin.Forms Mac应用程序。我遵循了这个指南,它似乎有点过时,但我仍然可以遵循Visual Studio Mac 2017的步骤: 在遵循指南的过程中,我会陷入以下困境: LoadApplication(new App()); 它说: The name 'LoadApplication' does not exist in the current context 我试图清理一切,只构建PCL项目,删除并重新添加对MacOS项目的引用(如另一个问题所述),但没

我只是想创建一个Xamarin.Forms Mac应用程序。我遵循了这个指南,它似乎有点过时,但我仍然可以遵循Visual Studio Mac 2017的步骤:

在遵循指南的过程中,我会陷入以下困境:

LoadApplication(new App());
它说:

The name 'LoadApplication' does not exist in the current context
我试图清理一切,只构建PCL项目,删除并重新添加对MacOS项目的引用(如另一个问题所述),但没有成功

我错过了什么

或者macOS支持是否已被删除

后续行动1 当我在命令行上运行
dotnet build
时,我得到:

Microsoft (R) Build Engine version 15.7.179.6572 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

/Users/jens/tests/desktop/FormsTest/FormsTest.Mac/FormsTest.Mac.csproj(108,3): error MSB4019: The imported project "/usr/local/share/dotnet/sdk/2.1.302/Xamarin/Mac/Xamarin.Mac.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Build FAILED.

/Users/jens/tests/desktop/FormsTest/FormsTest.Mac/FormsTest.Mac.csproj(108,3): error MSB4019: The imported project "/usr/local/share/dotnet/sdk/2.1.302/Xamarin/Mac/Xamarin.Mac.CSharp.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
    0 Warning(s)
    1 Error(s)

Time Elapsed 00:00:00.10
Microsoft(R)为.NET Core构建引擎版本15.7.179.6572
版权所有(C)微软公司。版权所有。
/Users/jens/tests/desktop/FormsTest/FormsTest.Mac/FormsTest.Mac.csproj(108,3):错误MSB4019:未找到导入的项目“/usr/local/share/dotnet/sdk/2.1.302/Xamarin/Mac/Xamarin.Mac.CSharp.targets”。确认声明中的路径正确,并且文件存在于磁盘上。
生成失败。
/Users/jens/tests/desktop/FormsTest/FormsTest.Mac/FormsTest.Mac.csproj(108,3):错误MSB4019:未找到导入的项目“/usr/local/share/dotnet/sdk/2.1.302/Xamarin/Mac/Xamarin.Mac.CSharp.targets”。确认声明中的路径正确,并且文件存在于磁盘上。
0个警告
1个错误
时间流逝00:00:00.10

那么,如何安装这个“Xamarin.Mac.CSharp.targets”

当使用
msbuild
时,我得到了相同的错误,即
LoadApplication
不存在。包确实被添加了。是的,我在
AppDelegate.cs
didfishLaunching
中添加了它。好的,我找到了。我的
AppDelegate.cs
仍然是从
NSApplicationDelegate
继承的,而不是
FormsApplicationDelegate
我仍然有同样的问题。XF是否支持mac?