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:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user