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

[BUG] Hot Reload not properly reloading changes #1710

Open
InclementDab opened this issue Jan 4, 2025 · 0 comments
Open

[BUG] Hot Reload not properly reloading changes #1710

InclementDab opened this issue Jan 4, 2025 · 0 comments
Labels
area-hotreload Issues with Hot Reload experiences bug Something isn't working

Comments

@InclementDab
Copy link

Describe the Issue

Version 1.15.13 Pre-release.

Hot reload diagnostic output provides the following information:

2025-01-04 14:02:51.956 [info]  Starting session.
2025-01-04 14:03:21.483 [info]  💡 Possible code changes were found.
2025-01-04 14:03:22.149 [info]  Checking for code updates...
2025-01-04 14:03:22.179 [info]  Exception thrown for Check for code updates: 0x80131500 - Unable to find method 'GetUpdatesAsync/1' on {no object} for the following reasons: Microsoft.CodeAnalysis.EditAndContinue.ManagedHotReloadLanguageServiceBridge.GetUpdatesAsync(CancellationToken) parameter(s) (excluding any CancellationToken): 0 - 0, but the request supplies 1
2025-01-04 14:03:22.179 [info]  Stack trace for RemoteMethodNotFoundException:
   at StreamJsonRpc.JsonRpc.InvokeCoreAsync[TResult](RequestId id, String targetName, IReadOnlyList`1 arguments, IReadOnlyList`1 positionalArgumentDeclaredTypes, IReadOnlyDictionary`2 namedArgumentDeclaredTypes, CancellationToken cancellationToken, Boolean isParameterObject)
   at Microsoft.VisualStudio.Debugger.Shared.Utilities.LoggerExtensions.LogOnExceptionAsync[T](ValueTask`1 this, LoggerInformation loggerInformation, Boolean propagateException)
2025-01-04 14:03:22.182 [info]  An unexpected error has occurred, any pending updates have been discarded.
2025-01-04 14:03:22.189 [info]  ❌ Hot Reload failed due to an unexpected error.
2025-01-04 14:03:22.217 [info]  Exception found while applying code changes: Error: Unable to find method 'GetUpdatesAsync/1' on {no object} for the following reasons: Microsoft.CodeAnalysis.EditAndContinue.ManagedHotReloadLanguageServiceBridge.GetUpdatesAsync(CancellationToken) parameter(s) (excluding any CancellationToken): 0 - 0, but the request supplies 1```

**Version 1.14.14**, with identical project configuration, files and steps.

Note: While stating things were successfully applied, there are no changes to the program without restarting.

Output:

2025-01-04 14:06:52.418 [info] Starting session.
2025-01-04 14:06:59.610 [info] 💡 Possible code changes were found.
2025-01-04 14:07:00.418 [info] Checking for code updates...
2025-01-04 14:07:00.483 [info] Applying code updates...
2025-01-04 14:07:00.968 [info] Code changes were successfully applied.


### Steps To Reproduce

1. Create console dotnet project `dotnet new console -n "Test"`
2. Paste the following code ``` while (true) {
    Console.WriteLine("Hello, World!");
    Thread.Sleep(1000);
}```
3. Comment out `Console.WriteLine`, hot reload
4. Prints continue!

### Expected Behavior

Print stop :)

### Environment Information

- Extension version 1.14.14
- Windows 11
@InclementDab InclementDab added the bug Something isn't working label Jan 4, 2025
@AbhitejJohn AbhitejJohn added the area-hotreload Issues with Hot Reload experiences label Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-hotreload Issues with Hot Reload experiences bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants