Fix web-server resource names when using a different assembly name (e.g. when debugging the Windows forms UI locally). (#2382)

Co-authored-by: Tobias Jüttner <tjuettner@nepatec.de>
This commit is contained in:
tj81
2026-05-20 13:49:55 +02:00
committed by GitHub
co-authored by Tobias Jüttner
parent abfc4f5705
commit 084aad3e90
@@ -445,7 +445,7 @@ public class HttpServer
private async Task ServeResourceFileAsync(HttpListenerResponse response, string name, string ext)
{
// resource names do not support the hyphen
name = "LibreHardwareMonitor.Resources." +
name = Assembly.GetExecutingAssembly().GetName().Name + ".Resources." +
name.Replace("custom-theme", "custom_theme");
string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();
@@ -486,7 +486,7 @@ public class HttpServer
private async Task ServeResourceImageAsync(HttpListenerResponse response, string name)
{
name = "LibreHardwareMonitor.Resources." + name;
name = Assembly.GetExecutingAssembly().GetName().Name + ".Resources." + name;
string[] names = Assembly.GetExecutingAssembly().GetManifestResourceNames();