In this repository you will find the code examples for my book "Developing cross-platform apps with .NET MAUI" (ISBN: 978-3-446-47261-7), published in December 2022 by Carl Hanser Verlag.
This book follows two strategies for the code examples. Within each chapter folder there are subfolders that end with the word Demo. In these subfolders you will find the example codes for the listings of the corresponding chapters.
From Chapter 9 onwards, there is also a subfolder ElVegetarianoFurio
in most chapter folders. This is the source code of the example app that we will develop step by step in this book. The source code of the example app in the respective chapter folders corresponds to the progress to the end of the chapter.
The content of the example app is the implementation of a menu app for the fictional vegetarian Spanish restaurant El Vegetariano Furio (in German: The Angry Vegetarian).
The examples for this book were originally written for .NET 6. Shortly before the book was published, .NET 7 came out. Since .NET 7 brought some improvements to .NET MAUI, I decided to update the examples in the main branch to .NET 7. To run these examples you need Visual Studio 2022 Update 17.4 or later.
You can find the original .NET 6 examples in the net-6 branch. To run these examples, you need Visual Studio 2022 Update 17.3 or later.
Corrections to technical errors in the book as well as spelling corrections can be found on the website for this book, which you can access at https://www.andrekraemer.de/maui-buch.
I will continually correct any errors in the code examples on this GitHub repository. If you find an error in the examples that has not yet been corrected, I invite you to create an issue via the GitHub repository.
If you have any questions or comments about the book, don't be afraid to contact me directly by email at [email protected] or on Twitter at https://twitter.com/codemurai. Please understand that I can only answer questions at this email address that relate directly to the content of the book. However, I would be happy to clarify any further questions in training courses and workshops, which you can also request at this email address.
If you get the following error when compiling the examples, you are missing the corresponding Android SDK:
Could not find android.jar for API level 31. This means the Android SDK platform for API level 31 is not installed. Either install it in the Android SDK Manager (Tools > Android > Android SDK Manager...), or change the Xamarin.Android project to target an API version that is installed. (C:Program Files (x86)Androidandroid-sdkplatformsandroid-31android.jar missing.)
To fix the error, all you have to do is reinstall the missing Android SDK. To do this, open the Android SDK Manager from the Tools | menu in Visual Studio Android