Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Configuration.StartsWith('Debug') instead of Configuration == 'Debug' for Debug specific build settings #25874

Open
SteveBush opened this issue Nov 15, 2024 · 0 comments

Comments

@SteveBush
Copy link

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant