-1

For a very peculiar solution I need a customer of mine to:

  1. launch visual studio
  2. open solution
  3. launch project

The target is having a link that does it all so that the customer has just to click on an icon and the magic happens with no efforts from him

So no problem for point 1. but what for the other points?

Thanks

Luca
  • 918
  • 2
  • 13
  • 30
  • Why in the world would you do that instead of just deploying the solution? – Fildor Aug 23 '21 at 09:26
  • As I said it's complicated but here it is: we are hunting down a bug wich appears ones in a week. So I installed VS at the customer's and ask him to launch it instead of launching the deployed version. By doing so anytime the problem appears my program instead of crashing, will have VS to reveal where the problem is. The only problem is that the customer complains for having to perform the aforementioned 1.2.3. operation. And by the way logging to understand didn't help – Luca Aug 23 '21 at 09:35
  • 2
    Well, logging would be the way go, though. What's the client supposed to do with VS when the App happens to hiccup? Do you have all the global exception handlers in place? Did you log actually useful information? To be frank: If a software manufacturer demanded, I install an IDE and ran their app from it to hunt down a bug, I'd be looking for a substitution "yesterday" ... – Fildor Aug 23 '21 at 09:42
  • I am using Nlog and performed countless test but when the system crashes Nlog doesn't write the last lines which could be clue to the problem – Luca Aug 23 '21 at 09:59
  • Then that's an issue of how you setup NLog. Do you have a global Exception Handler? Do you close the logging system before letting the app die? (`LogManager.Shutdown()` to flush pending entries...) – Fildor Aug 23 '21 at 10:01
  • Yes to all questions :-( – Luca Aug 23 '21 at 11:53

1 Answers1

1

First of all i want to say that i'd discourage you from that approach. if you are hunting down a bug you should look into logging and exception handling. Anyways...

What you are trying to do can be accomplished with

devenv.exe /run

Check out the documentation for more details.

D.J.
  • 3,644
  • 2
  • 15
  • 22