Deploying MAUI Android but getting iOS errors!

Pat Long 46 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.
5,144 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,545 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Pat Long 46 Reputation points
    2024-07-09T16:40:29.9033333+00:00

    I no longer have the issue. I recreated the project to a temporarily named one and that fixed it. I am going to have to go back to the original named one soon. Hopefully it does not come back

    1 person found this answer helpful.
    0 comments No comments

  2. Bruce (SqlWork.com) 65,661 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://learn.microsoft.com/en-us/dotnet/maui/platform-integration/configure-multi-targeting?view=net-maui-8.0

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.