diff --git a/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs b/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs index 34e3471f6f8..b140c182029 100644 --- a/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs +++ b/irc/TechBot/TechBot.Library/Factory/CommandFactory.cs @@ -18,11 +18,9 @@ namespace TechBot.Library public static void LoadPlugins() { //get the file names of the dll files in the current directory. - FileInfo objExeInfo = new FileInfo(@"C:\Ros\current\irc\TechBot\TechBot.Console\bin\Debug\"); - - foreach (FileInfo objInfo in objExeInfo.Directory.GetFiles("*.dll")) + foreach (string fileName in Directory.GetFiles(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "*.dll")) { - LoadPluginsFromDLLFile(objInfo.FullName); + LoadPluginsFromDLLFile(fileName); } }