-
Notifications
You must be signed in to change notification settings - Fork 5.4k
MetadataUpdateHandler not working in custom host #113452
Copy link
Copy link
Closed
Labels
area-Diagnostics-coreclrenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstracking-external-issueThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directlyThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly
Milestone
Metadata
Metadata
Assignees
Labels
area-Diagnostics-coreclrenhancementProduct code improvement that does NOT require public API changes/additionsProduct code improvement that does NOT require public API changes/additionstracking-external-issueThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directlyThe issue is caused by external problem (e.g. OS) - nothing we can do to fix it directly
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
When using a custom host (using nethost/hostfxr), hot reloading works as expected (tested in Visual Studio), however, the metadata update handler as specified using the
[MetadataUpdateHandler(..)]attribute does not trigger.Since hot reloading works I expected the metadata update handler to work as well. Is this intended to work or not?
Reproduction Steps
Given the following managed code, uncommenting the line of code and hitting the hot reload button in Visual Studio, causes the console output to include the added line.
Full repro (managed+unmanaged) can be found here https://github.com/ikkentim/MetadataUpdateHandler-repro
Expected behavior
Changed output to appear in the console and a combination of
ClearCache/UpdateApplicationto be written to the console.Actual behavior
Changed output appears in the console, but neither
ClearCacheorUpdateApplicationappears in the console.Regression?
No response
Known Workarounds
No response
Configuration
Microsoft.NETCore.App 9.0.0
Windows 10
Other information
No response