-
Notifications
You must be signed in to change notification settings - Fork 12
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
C# hot reload - no code changes were found #1450
Comments
@davidortinau - Can you set the environment variable below to enable more logs for C# Hot Reload, then attach them. Also, can you note the versions of the C#, C# DevKit, and MAUI extensions you are using. They are internal versions, what's about to be published to prerelease tomorrow, right?
|
@BretJohnson correct, I'm on pre-release of everything here. MAUI v1.3.29 |
Any progress on this? |
@lucasmsoares96 - Assuming you see this issue, would you mind following the steps here, attaching the logs: #1450 (comment). Thanks much. |
The problem is intermittent and occurs in different contexts. Versions:Extensions:
Binaries
Log filesAnalysis.log
Trace.log
Did I forget something? |
@lucasmsoares96 Thanks. What is the |
In the logs above, changes were made to 2 files: WebApp.csclass WebApp
{
static void Main(string[] args)
{
var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();
var chatbot = new Chatbot();
app.MapPost("/ChatMessages", async (ChatMessages person) =>
{
Console.WriteLine(person);
var result = await chatbot.StartAsync(person.Text);
return Results.Ok("empty return"); // comment this
// return Results.Ok(result.Content); // uncomment this
});
app.Run();
}
record ChatMessages(string User, string Text);
} LightsPlugin.csusing System.ComponentModel;
using System.Text.Json.Serialization;
using Microsoft.SemanticKernel;
public class LightsPlugin
{
private readonly List<LightModel> lights = new()
{
new LightModel { Id = 1, Name = "Table Lamp", IsOn = false },
new LightModel { Id = 2, Name = "Porch light", IsOn = false },
new LightModel { Id = 3, Name = "Chandelier", IsOn = true }
};
[KernelFunction("get_lights")]
[Description("Gets a list of lights and their current state")]
[return: Description("An array of lights")]
public async Task<List<LightModel>> GetLightsAsync()
{
return lights;
}
[KernelFunction("change_state")]
[Description("Changes the state of the light")]
[return: Description("The updated state of the light; will return null if the light does not exist")]
public async Task<LightModel?> ChangeStateAsync(int id, bool isOn)
{
var light = lights.FirstOrDefault(light => light.Id == id);
if (light == null)
{
return null;
}
light.IsOn = isOn;
return light;
}
}
public class LightModel
{
[JsonPropertyName("id")]
public int Id { get; set; }
[JsonPropertyName("name")]
public string Name { get; set; }
[JsonPropertyName("is_on")]
public bool? IsOn { get; set; }
} When I finished restarting the debug, experiment 1 (commenting and uncommenting the returns line in file 1) stopped working. LogsTrace.log
|
Type: Bug
In this version I'm unable to C# hot reload. I've cleared my bin/obj folders. All I get in the output is messages like this. I'm using .NET 9 Preview 7 and targeting net9.0-maccatalyst and net9.0-ios.
2024-09-08 21:33:51.865 [info] 💡 Possible changes were found.
2024-09-08 21:33:58.458 [info] No code changes were found.
2024-09-08 21:34:03.646 [info] No code changes were found.
2024-09-08 21:50:37.817 [info] 💡 Possible changes were found.
2024-09-08 22:01:54.861 [info] 💡 Possible changes were found.
2024-09-08 22:02:02.824 [info] No code changes were found.
Extension version: 1.11.4
VS Code version: Code - Insiders 1.93.0-insider (4849ca9bdf9666755eb463db297b69e5385090e3, 2024-09-04T13:13:15.344Z)
OS version: Darwin arm64 23.6.0
Modes:
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: