Hello.
I am working with a VS solution with
- 1 Draft WebAPI
- 1 WPF project
- 1 Draft Win8
The WepAPI project is also a hub of SignalR communications with the WPF and the Win8 projects. I use the the capabilities of launching of multiple Visual Studio projects at once:
The problem is that both the WPF project and the Win8 project, set up the “signalR client” in his AppStart(); and the project WebAPI takes a little to start working, so I have a set of timeouts in the 2 clients apps.
I was thinking that someone has already created an Visual Studio AddIn which allows me to control the time of release and run for each project, but I did not find it. So I opted for a solution much more dirty, very dirty, something like to add the following code in the AppStart() of each app:
1: public static void DelayAppStart()
2: {
3: #if DEBUG
4: // delayed start of the app to be
5: // used locally with the service layer
6: Thread.Sleep(5000);
7: #endif
8: }
In debug mode, each app in your start “stops 5 seconds” before continuing if execution. Then in Release, this code would be already not run… Gives me a bad spine that you won’t see (code smell tell him), although it is the temporary solution.
Do you have any better idea ?
Greetings @ La Finca
El Bruno
Leave a comment