我在 Visual Studio 的构建前和构建后事件中有这些脚本,用于卸载和安装 Windows 服务
%WinDir%\Microsoft.NET\Framework\v4.0.30319\installutil /u "$(TargetPath)"
%WinDir%\Microsoft.NET\Framework\v4.0.30319\installutil "$(TargetPath)"
当我第一次构建它时;
当我重建时,我得到这个文件未找到异常
 System.IO.FileNotFoundException:无法加载文件或程序集“ file:///C:\Projects\DeviceManagement.ServiceHost\bin\Debug\DeviceManagement.ServiceHost.exe”或其依赖项之一。该系统找不到指定的文件..
我可以在我的调试文件夹中看到这个 exe 文件。