Search code examples
c#solution

Run a second project from within the same solution


I've been tasked with building a custom updater but are struggling with how to run this. I could of course just create a separate app to take care of this but it is preferred that it all stay in the same solution. In my solution I have the project "Main" which is a Forms application and the project "AutoUpdater" which is a console application.

solution with two projects

My idea was to have "Main" run the "AutoUpdater" console app in a separate process or possibly have the program copy the autoupdater.exe in a temp folder and then run it from there (to prevent file lock)

But how to I tell Main to run AutoUpdater?


Solution

  • You can use Process.Start to run the AutoUpdater exe by providing the path.