Search code examples
visual-studioprojects

How to launch EXE when project / solution / studio starts?


Is there anyway to customize the solution / project file so that it launches an EXE when it's loaded into Visual Studio or, as a second option, when Visual Studio is started? I know I can make a link to a BAT file or similar but I'd rather make it more seamless if possible.

I did check the possibility of adding custom tasks into the project file, since they are just MSBuild scripts but I couldn't find a suitable event to trigger it on.. They're all build-centric events.


Solution

  • Look at this question (Enumerate opened windows upon solution loading)

    Private Sub SolutionEvents_Opened() Handles SolutionEvents.Opened
      // VB.net code that runs the exe
    End Sub