3

I am just trying to create a Xamarin.Forms Mac Application. I followed this guide which seems a bit outdated but I can stil follow the steps with Visual Studio Mac 2017:

https://blog.xamarin.com/preview-bringing-macos-to-xamarin-forms/

When following the guide, I get stuck at the following:

LoadApplication(new App());

It says:

The name 'LoadApplication' does not exist in the current context

I tried to clean everything, build only the PCL project, remove and re-add the reference to the MacOS project as stated in another question but had no luck with it.

What am I missing?

Or has the macOS support been removed?

Followup 1

When I run dotnet build on the command line, I get:

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

So, how do install this "Xamarin.Mac.CSharp.targets"?

rabejens
  • 7,594
  • 11
  • 56
  • 104

0 Answers0