From 292fa54dda461a2aaf3fbe88fac100297c4218a9 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 26 Oct 2023 14:31:20 -0400 Subject: [PATCH] fix: Get rid of hardcoded path to dll Use Assembly.Location instead Bugs (fixed): * PubSubServer throws an exception on startup because it can't find dll at hardcoded path --- src/DataStreamSuite/PubSub/Client/TagTypeToAssembly.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/DataStreamSuite/PubSub/Client/TagTypeToAssembly.cs b/src/DataStreamSuite/PubSub/Client/TagTypeToAssembly.cs index 56242ea27..4f49c5e45 100644 --- a/src/DataStreamSuite/PubSub/Client/TagTypeToAssembly.cs +++ b/src/DataStreamSuite/PubSub/Client/TagTypeToAssembly.cs @@ -1,4 +1,6 @@ using System; +using System.IO; +using System.Reflection; namespace BCG { [Serializable] @@ -6,8 +8,11 @@ namespace BCG { //[Serializable] public class Entry { public string handlerClass = "BCG.PubSubServerTagHandler"; - // TODOds - public string assembly = "C:\\Users\\m_tah\\spark\\build\\Debug\\bin\\net7.0\\DataStreamCore.dll"; + + public string assembly = Path.Combine( + Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!, + "DataStreamCore.dll"); + public override string ToString() { return $"handlerClass: {handlerClass} assembly: {assembly}"; }