Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/299.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 运行多启动应用程序不会在发布时停止应用程序,而是在调试时停止应用程序_C#_Visual Studio 2010_Ipc - Fatal编程技术网

C# 运行多启动应用程序不会在发布时停止应用程序,而是在调试时停止应用程序

C# 运行多启动应用程序不会在发布时停止应用程序,而是在调试时停止应用程序,c#,visual-studio-2010,ipc,C#,Visual Studio 2010,Ipc,我有一个关于VisualStudio2010调试和发布版本运行的区别的问题。我有一个解决方案,有两个项目a和B。a依赖于B,并通过进程间通信调用B的方法 以下是一些场景: CASE A: Run B only - Stops the window when you click the STOP button on both on Debug and Release CASE B: Multi Startup Run Both A and B (Both action are set to "

我有一个关于VisualStudio2010调试和发布版本运行的区别的问题。我有一个解决方案,有两个项目a和B。a依赖于B,并通过进程间通信调用B的方法

以下是一些场景:

CASE A:
Run B only 
- Stops the window when you click the STOP button on both on Debug and Release

CASE B:
Multi Startup Run Both A and B (Both action are set to "Start"):
- Irregardless of the order of run, 
  On Release run, A is STOP but B is not stopped 
  On Debug run, B and A are both stopped
我想知道在调试版本和发布版本的VisualStudio上运行多启动时的区别是什么。我能想到的奇怪的事情是B在启动时注册一个IPCServiceChannel。但为什么问题是当我自己运行它时,B可以正确停止

IpcServerChannel serverChannel = new IpcServerChannel("ProcessName");
ChannelServices.RegisterChannel(serverChannel, true);

如何解决此问题的任何建议?

为多个项目设置多个启动需要为每个项目设置操作

操作,例如:无、启动&无调试启动

还有一件更重要的事情是,您需要设置项目开始的顺序

例如,如果希望服务器先启动,但如果它是顺序中的最后一个,则它将按顺序中的最后一个启动。您必须先移动服务器项目以执行,然后依次移动其余项目


结论:在多启动项目中,您必须为每个项目设置操作和顺序

是的,我在问题中忘记了这一点。我已经让他们两个都开始了。问题不是因为进程没有启动,而是因为进程没有停止。@请检查您的版本和调试配置有什么不同,可能会有所帮助