How to same code base for Windows and Mac in .Net Maui

Harshita Chaplot 0 Reputation points
2023-10-28T05:59:17.1066667+00:00

We are developing an application which is for backing up your data in USB and use unit testing in it when we run the project on Windows it works but the same code project runs on Mac it gives .net7.0-maccatalyst-x64 missing but I give target type x64 then I unable to run debug the project on Mac.

User's image

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,843 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,492 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,211 Reputation points
    2023-10-30T15:52:16.6433333+00:00

    for macOs, Maui only supports catalyst application (iPad app built to be hosted on macOs).

    the Maui app will run in a sandbox, and have restricted access to the file system. the sandbox folder structure will have links to ~/downloads and ~/pictures, but not access by default be sure to enable managed file access.

    Also enable access to the USB device. You can use IOUSBHost framework to access the USB..

    https://developer.apple.com/documentation/iousbhost

    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.