MonoLauncher实例在停止我的Visual Studio调试后挂起

问题描述 投票:0回答:1

现在我的Visual Studio 2015一直有问题。我在C#和MonoGame中工作。对于我的游戏,我正在运行MonoGame启动器的3个单独实例。但是,当我停止在Visual Studio中调试游戏时,通常情况是至少有一个MonoGame实例挂在后台悬浮。然后,这使我无法开始调试游戏,直到进入任务管理器并手动终止正在运行的进程为止。这已经使我的开发过程变慢了一段时间。

Image taken when i try to start debugging, while a process is running in the background.

Suspended MonoLauncher instance.

我希望获得一些有关为什么可能会发生这种情况的信息,并希望为此找到解决办法。任何帮助,将不胜感激。干杯。

c# visual-studio monogame
1个回答
0
投票

尝试以管理员身份运行Visual Studio。当您停止某些功能中间的调试时,仍然可以这样做。

如果您不想手动将其杀死。一种可能的选择/黑客程序是在程序关闭时运行批处理文件。

if (Debugger.IsAttached)
{
     System.Diagnostics.Process.Start(@"C:\KillMonoLauncher.bat");
}

KillMonoLauncher.bat文件中

taskkill /f /im MonoLauncher.exe
© www.soinside.com 2019 - 2024. All rights reserved.