Multiple apps in one project

Magnus Wallon 0 Reputation points
2024-06-26T13:24:29.92+00:00

Hi,
is it possible to have one project with multiple apps inside that share most of the code? I have some educational apps wich have different content based on the api they call but they all have common code for excercises etc.. In Xamarin I had them as completly different apps but now when starting to covert them to Maui I started to think that it would be better to have them in one project where they share all the code except frontpage, info.plist, link to api.. etc like structure in image.
Tried set it up with the help of ChatGPT but run in to a lot conflicts all tries so far. Is it possible and if so does anyine seen a guide on how to practially set up the project.

User's image

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,321 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yonglun Liu (Shanghai Wicresoft Co,.Ltd.) 41,041 Reputation points Microsoft Vendor
    2024-06-27T02:59:04.7733333+00:00

    Hello,

    MAUI does not support putting multiple projects into the same solution for reuse.

    For code reuse, MAUI officially provides a very convenient MAUI Class Library. You could refer to the answer in this thread and package the code to be reused into the Class Library for reference between multiple projects.

    Best Regards,

    Alec Liu.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    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.