27

In my solution there are eight different projects. Most of the time the startup project is project A but some times I need to run other projects to check things and to do that I must set other project as the startup project every time.

I want to know if there is any other way to run a project in the solution without setting it as the startup project? This will save me lots of time!

5 Answers 5

18

You can also bind this command to keyboard shortcut: Tools->Options->Environment->Keyboard

Search for "Startnewinstance"

This way you can achieve desired with 0 clicks :)

Sign up to request clarification or add additional context in comments.

2 Comments

For reference you want to look for the ClassViewContextMenus.ClassViewProject.Debug.Startnewinstance command (as of VS2015)
Perfect! Note that the run project is based on the current context: - if a file is selected (the file itself or the file view), the project it belongs to (check out the project name in the top-left dropdown of the file view; if it belongs to multiple projects, pick the one you want to run) - if a project is selected in the Solution Explorer, the selected project is run - if the Solution itself is selected in the Solution Explorer, nothing happens - if another window/item is selected, it falls back to the last selected window/item among the categories above
15

Right click on the project, there is an entry on the context menu to run the project in the debugger. Its right underneath the command to "Set as StartUp project".

Debug > Start New Instance 

Comments

12

It doesn't take a lot of time, just Right click the project and select "Set as startup project". 2 clicks.

If you want though you can use another method, right click the project, go to "Debug" and click on "Start new instance". 3 clicks!

3 Comments

thanks I haven't seen the debug options :( this is much more better than setting the project as startup project because usually I forget to set the start up project back to what it was and so It will take more than 2 clicks ;)
You forgot the two clicks needed to set the original project back as the startup project.
This is not fast. This is Microsoft fast, i.e. slow. As soon as you have Resharper installed (and even before then) when you do those clickings your eyes have to search through a long list to pinpoint the "set as startup project," and then you have to move your mouse to exactly the right position. It's not just a matter of clicks. It's a matter of searching and moving the mouse. Very wasteful. For it to be fast, some sort of keyboard shortcut or more easily locatable button would be necessary.
2

This answer I'm quoting from https://stackoverflow.com/a/20336060/130614 may help:

The options for startup projects can be found by right-clicking on the solution and selecting "Set Startup Projects". The options are pretty straightforward:

  • Current selection
  • Single startup project
  • Multiple startup projects

Comments

-3

Shift+F10 then press A key is a little faster than scrolling down.

1 Comment

That combination certainly doesn't work in VS2017 by default.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.