user245019
user245019

Reputation:

Launching another project from visual studio

This must be simple, but I guess I'm searching with the wrong key words.

I have a visual studio solution(2008) that includes two projects (win32). is it possible for one to launch another? they are entirely self sufficient programs.

Upvotes: 0

Views: 151

Answers (2)

graham.reeds
graham.reeds

Reputation: 16476

Right click on Project. Select Properties. Expand Build Events, select Pre-Build Events. In Command Line put the path to your executable. Use the macro's for this.

If you need one to start before the other then set it to be a dependent of the other. Right click the Solution, select Project Dependencies and choose which project it is dependent on.

Upvotes: 1

WolfgangP
WolfgangP

Reputation: 3233

If you want one project binaray executing the other, yes, this is possible.

If you want Project1 to be executed before or after the compilation of Project 2:

  • Set Project2 to be dependent of Project1, so Project1 gets compiled first (Menu Project > Project > Project Dependencies)
  • Setup a pre- or post-build-action in Project2 that executes Project1.exe (Project Properties > Build Events > Pre-Build Event or Post-Build Event)

Upvotes: 1

Related Questions