Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I make the Startup Project stick in VS2012

I understand from this question that the Startup project is set in your .suo file.

And I understand from this question that storing your .suo file in TFS's source control system is generally frowned upon.

In my solution, the Startup Project is the second project in my solution. When I pull down a fresh copy of the solution from TFS, VS seems to default to the first project in the solution as the Startup Project. Is there another way to make my preferred Startup Project stick?

like image 413
BIBD Avatar asked Jul 16 '13 14:07

BIBD


People also ask

How do I change the startup programs in Visual Studio?

To change the startup itemIn the On startup, open list, choose what you want to happen after Visual Studio launches.

How do I remove set as startup project in Visual Studio?

Select a project and right click, then select 'Remove from StartUp Projects...'

How do I change the startup project code in Visual Studio?

In Visual Studio, you can get this done by – right click on the project, and choose “ Set as Startup project" . If the project has multiple classes with Main , in project Properties, Application tab, select the class from the Startup object dropdown.


1 Answers

As this post suggests, do the following:

Here is the trick: Close your Visual Studio and open the .sln file in your favorite text editor. Starting in line 4 you see all your projects encapsulated in Project - EndProject lines. If you don't have a .suo file in your solution directory, Visual Studio picks the first one as the default startup project. So just cut and paste your default startup one to the top position, delete your .suo file and open your solution in Visual Studio. Ta daa!

like image 80
Isaiah4110 Avatar answered Nov 24 '22 17:11

Isaiah4110