Visual Studio delay between multiple startup projects?

前端 未结 9 1302
暖寄归人
暖寄归人 2021-02-06 23:31

how to add some delay between startup projects in solution?

\"enter

I want Client

9条回答
  •  别那么骄傲
    2021-02-06 23:51

    For the n-tier application I am currently working on, I combined the Mutex method suggested by Romil (slightly different code but same principle) and encapsulated it within a method with a [Conditional("DEBUG")] attribute applied (so it gets stripped out in release mode). We also surround the mutex logic with if (System.Diagnostics.Debugger.IsAttached) {...} since QA builds use Debug mode.

    We originally just used a Thread.Sleep with a wait period that worked for most developers machines, but we ran into problems because devs' computer speeds vary and as we added more and more to the server bootstrapper, we had to keep increasing the wait period.

提交回复
热议问题