Visual Studio Tips and tricks: Default startup project
When you first open a solution, you just want to press F5 to start debugging. If the solution contains multiple projects, you want the main project to be the startup project. You don't want the library project to be the startup project, but the web or desktop application. This provides a good development experience. Of course, you can change the startup project manually using the context menu or the project dropdown menu:
Visual Studio selects the first project of the solution as the startup project unless you change it manually. So, if you want your solution to be well configured for the first use, you may need to change the project order in the sln file. Simply move the project above all other projects:
If you open Visual Studio, the startup project should be the application:
It's a little change, but it's so convenient when you clone a repository and open the solution in Visual Studio for the first time.
This post is part of the series 'Visual Studio Tips and Tricks'. Be sure to check out the rest of the blog posts of the series!
- View and edit the Tab Order of Windows Forms Controls
- Comparing files using Visual Studio
- Visual Studio Tips and tricks: Clipboard history
- Visual Studio Tips and tricks: Open recently closed files
- Visual Studio Tips and tricks: Multi-line and multi-cursor editing
- Visual Studio Tips and tricks: Extend/Reduce selection
- Visual Studio Tips and tricks: Undock/Re-dock a tool window
- Visual Studio Tips and tricks: Regex editing
- Visual Studio Tips and tricks: Find the current opened file in the solution explorer
- Visual Studio Tips and tricks: Default startup project (this post)
- Visual Studio Tips and tricks: Open the documentation of a symbol
- Visual Studio Tips and tricks: Paste as JSON
- Visual Studio Tips and tricks: Add project reference using drag & drop
- Visualizing the code coverage results from Azure Pipelines in Visual Studio
- Debugging a .NET assembly without the source code with Visual Studio
- Visual Studio Tips and tricks: Subword navigation
Do you have a question or a suggestion about this post? Contact me!