From dc69d964375371855200db7751a3db1946fb63af Mon Sep 17 00:00:00 2001 From: erikzhang Date: Mon, 2 Dec 2019 02:40:33 +0800 Subject: [PATCH] Update MainService.cs --- neo-cli/Shell/MainService.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/neo-cli/Shell/MainService.cs b/neo-cli/Shell/MainService.cs index 4ecb1e6da..cd211cfe2 100644 --- a/neo-cli/Shell/MainService.cs +++ b/neo-cli/Shell/MainService.cs @@ -1257,14 +1257,14 @@ private bool OnUnInstallCommand(string[] args) return true; } - string path = plugin.GetType().Assembly.Location; - File.Delete(path); - path = Path.ChangeExtension(path, null); + string path = Path.GetDirectoryName(plugin.ConfigFile); if (Directory.Exists(path)) { Directory.Delete(path, true); } + path = Path.ChangeExtension(path, "dll"); + File.Delete(path); Console.WriteLine($"Uninstall successful, please restart neo-cli."); return true; }