Use Configuration.StartsWith('Debug') instead of Configuration == 'Debug' for Debug specific build settings
- Dominant language
- C#
- Stars
- 3.2k
- Forks
- 1.3k
- PR merge metrics
- PR metrics pending
Description
### Description
I use Azure pipelines to build the core and platform-specific libraries for my Maui application. I use build configurations to control which projects are built on each Azure-hosted build agent (Windows, MacOS, Linux). For example, I use "Debug-MacOS" as a build configuration for projects that can be built on the MacOS build host. Similarly, I use Debug-Windows to indicate projects that can only be built on the Windows build agent. I have analogous build configurations for release. In Visual Studio on Windows, I have the option of building the configuration "Debug-Windows" or just "Debug" which includes all projects.
My feature requests are two-fold:
1) Document all build settings that are tied to "Debug" or "Release" configurations. Every release, I spend hours trying to figure out things like AOTCompile, Trimming, release-only optimizations and debug-only configuration settings.
2) Instead of using Configuration == 'Debug', use Configuration.StartsWith('Debug'). Similarly, for Release configurations. This allows the developer to have they own configurations that behave like Debug or Release without having to hardcode 'Debug' or 'Release'. I could have a build configuration like 'Debug-Simulator' that would automatically reflect MAUI's view of debug settings.
### Public API Changes
* Change all references to Configuration == 'Debug' to Configuration.StartsWith('Debug')
* Change all references to Configuration == 'Release' to Configuration.StartsWith('Release')
* Update the developer documents to reflect these changes.
### Intended Use-Case
Support for build configurations outside of "Debug" and "Release"
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.