Did you mark the the main file as “active”? Right click in “Solution Explorer” => “Mark as active”. This should do exactly what you want it to.
Same with “Active Project” if you have more than one project in a solution.
Thanks Endurion!