【发布时间】:2017-10-10 09:24:19
【问题描述】:
我正在使用以下代码安装服务。
string[] commandLineOptions = new string[0];
System.Configuration.Install.AssemblyInstaller installer = new System.Configuration.Install.AssemblyInstaller(path, commandLineOptions);
installer.UseNewContext = true;
installer.Install(null);
installer.Commit(null);
安装运行良好,但安装后,在尝试删除服务中包含的 dll 文件时,由于访问被拒绝,无法执行此操作。关闭应用程序后问题消失(仍然安装服务)。如何解决?
【问题讨论】:
标签: c# dll service installation