gpt4 book ai didi

c# - 如何停止在 C# 中运行 exe 以启动新实例?

转载 作者:太空宇宙 更新时间:2023-11-03 22:00:59 27 4
gpt4 key购买 nike

我有一个用 C# 编写的服务器软件。有时我会犯这个错误:

Unable to copy file "obj\x86\Debug\Server.exe" to "bin\Debug\Server.exe". The process cannot access the file 'bin\Debug\Server.exe' because it is being used by another process.

我如何理解我的程序仍在后台运行并停止它?

最佳答案

这很可能不是由您的软件(您正在编写的软件)引起的,而是由 IDE 本身引起的。

我通常只是使用任务管理器来杀死任何仍在挂起的 vshost 进程,但这可能不是很安全。或者有时只需要重新启动 Visual Studio。

关于c# - 如何停止在 C# 中运行 exe 以启动新实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10137734/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com