-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Add a config switch to fully disable hot-reload #123744
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace System.Reflection.Metadata | ||
| { | ||
| public static partial class MetadataUpdater | ||
| { | ||
| /// <summary> | ||
| /// Returns true if hot reload is explicitly disabled via the DOTNET_HOTRELOAD_DISABLED environment variable | ||
| /// or the System.Reflection.Metadata.HotReloadDisabled AppContext switch set to true. | ||
| /// </summary> | ||
| internal static bool IsHotReloadDisabled => | ||
| AppContextConfigHelper.GetBooleanConfig("System.Reflection.Metadata.HotReloadDisabled", "DOTNET_HOTRELOAD_DISABLED"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not be called HotReload. HotReload is the larger Visual Studio feature. The name of the runtime sub-feature is metadata updater. Can this be called |
||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
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 have
DOTNET_MODIFIABLE_ASSEMBLIESenvironment variable that is mean to control the set updateable assemblies. Currently, the only valid value isdebugthat makes all assemblies compiled as debug modifiable. Would it work to extend this env variable - e.g. recognizenoneas a value that makes all assemblies unmodifiable and thus disables metadata updater?