Deploying MAUI Android but getting iOS errors!

Pat Long 36 Reputation points
2024-06-28T17:08:33.76+00:00

I am porting a project from XF to MAUI. I am trying to build a Signle Project Class Library that has TargetFrameworks of

<TargetFrameworks>net8.0-android;net8.0-ios</TargetFrameworks>

I have Android and iOS specific files under Platforms\Android and Platforms\iOS.

I have an Android device attached and succesfully selected in VS2022.

I have multiple "Solution Configurations" ported over from XF solution. Currently selected "Debug"

I have "Any CPU" selected in "£Solution Platforms" drop down.

Why oh why is VS2022 complainig that it cannot build files in the iOS folder. I am not currently trying to build for iOS!!!

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,806 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,117 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 59,966 Reputation points
    2024-06-28T17:17:27.96+00:00

    Check your project file that the compile conditions are correct for each platform folder. See

    https://video2.skills-academy.com/en-us/dotnet/maui/platform-integration/configure-multi-targeting?view=net-maui-8.0

    0 comments No comments