- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.2k
 
Closed
Labels
Area-InteractiveBugResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented
Milestone
Description
Version Used
VS 2022 Version 17.9.5
Roslyn 4.9.0 (a98c90d)
Project info
C# 12.0
.NET 8.0
Steps to Reproduce
- Create a file 
XYZ.csthat contains a type named XYZ - Within that same file declare another type named ABC (different than XYZ)
 - Use the "Move type to ABC.cs" code action
 - Run the program with a debugger
 - Pause execution at any point
 - Edit any file within the assembly containing the above types (XYZ and ABC)
 - Ensure that there are no compiler errors after the edits
 - Use Hot Reload to load the changes onto the program and continue execution
 
Expected Behavior
Hot Reload works as expected, without any errors.
Actual Behavior
Hot Reload fails, and the following is observed in the output of Hot Reload:
19:44 51.27 [Error] E:\repos\[truncated]\File.cs (line 1): error CS8055: Cannot emit debug information for a source text without encoding.
19:44 51.27 Invalid changes were found. Please refer to the Error List window to fix those issues.
The user is prompted to edit the code or rerun the program anew, after Hot Reload fails.
The bug can be worked around by manually changing and saving changes to the ABC file before hot reloading, without stopping the current execution. Once the file is manually changed, hot reloading works.
danports, palenshus, OJacot-Descombes, luisllamasbinaburo, joseluisct and 4 more
Metadata
Metadata
Assignees
Labels
Area-InteractiveBugResolution-FixedThe bug has been fixed and/or the requested behavior has been implementedThe bug has been fixed and/or the requested behavior has been implemented