Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
lawrence_shaun_introducing_net_maui_build_and_deploy_crosspl.pdf
Скачиваний:
46
Добавлен:
26.06.2023
Размер:
5.15 Mб
Скачать

Chapter 14 Releasing Our Application

Windows

When distributing your .NET MAUI app for Windows, you can publish the app and its dependencies to a folder for deployment to another system. Publishing a .NET MAUI app for Windows creates an MSIX app package, which has numerous benefits for the users installing your app.

MSIX is a Windows app package format that provides a modern packaging experience to all Windows apps.

Additional Resources

Microsoft provides documentation on how to distribute applications via the Microsoft Store.

•\ Microsoft: How to publish an application ready for the App Store, https://learn.microsoft.com/dotnet/ maui/windows/deployment/overview

•\ Microsoft: How to upload your application to the Microsoft Store, https://developer.microsoft.com/ microsoft-store/

Things toConsider

Many issues can crop up when you make the jump from a debug build running on a simulator, emulator, or physical device to building a release build ready to run on an end user’s machine.

Following Good Practices

Each of the platform-specific sections prior to this one contained information or links to resources that show how to deploy your applications to each platform provider’s public store. This is all great but

416

Chapter 14 Releasing Our Application

one key detail that is lacking is the use of continuous integration and continuous delivery (CI/CD) in order to provide a clean environment that can reliably produce a build that can be deployed.

Continuous integration (CI) is the practice of merging all developers' working copies to a shared mainline.

Continuous delivery (CD) is a software engineering approach in which teams produce software in short cycles, ensuring that the software can be reliably released at any time and, when releasing the software, without doing so manually. It aims at building, testing, and releasing software with greater speed and frequency. The approach helps reduce the cost, time, and risk of delivering changes by allowing for more incremental updates to applications in production. A straightforward and repeatable deployment process is important for continuous delivery.

Both concepts are usually considered together as they help to make it a far smoother experience when working in a team. I was there in the early stages of learning and building apps and I neglected this part. If I could go back and tell a much younger Shaun some advice, it would be to get this part set up and early in the development process. Thanks to the dotnet CLI that is available to us, the setup to provide the necessary steps is straightforward. On top of that, tools like GitHub, Azure DevOps, TeamCity, and others will likely provide some level of out of the box support for this.

If you imagine that each of the applications can be built with the dotnet CLI, for example

dotnet publish -f:net7.0-android -c:Release

417