-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Codebase: Add AppEnvironment enum #12025
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be using the IHostEnvironment.EnvironmentName property to set the environment like this:
Host.CreateDefaultBuilder(args)
#if SIDELOAD
.UseEnvironment("Sideload")
#else
.UseEnvironment("Store")
#endif
// ...
We'll need to add some more configurations, right now sideload and sideload preview use the same configuration but they have different environments. |
How would this be done with the enum? |
@hecksmosis we might have to rework this, Luke's suggestion would be instead of an enum but it won't work unless we add additional configurations to the project. I think it's best to use an enum for now and hold off on implementing |
So should we merge this for the time being or do I modify it? |
@hecksmosis we can merge but I think we should move the code out of app.xaml. The question is to where... |
Would it be better to set the value using preprocessor directives set by MSBuild instead of reading from the display name? |
@hecksmosis I created the new project configurations so we can switch away from using the display names. |
…add_app_env_enum
…into add_app_env_enum
What are the environment name strings? |
|
Is release the dev version? |
Release and Debug are both dev versions. |
Ok |
…into add_app_env_enum
Co-authored-by: Yair <39923744+yaira2@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Resolved / Related Issues
Closes Code Quality: Add Environment Enum AppModel #11959
Validation
How did you test these changes?
Screenshots (optional)
Add screenshots here.