58

When changing startup project for the solution from project A (initial startup) to project B (newly added project) the change of the startup project does not appear to be saved.

When running F5 VS always change back to original setting of project A.

I have checked the settings and also options build and run (for new solutions use the currently selected project as startup project) is not checked.

I have tried to delete the .suo file and so far no luck so any other ideas whats going on ?

Anders Nilsson
  • 1,465
  • 12
  • 12
  • Does this occur just locally? If I'm not mistaken, the start project for a solution is not stored in the `*.sln` file, but in the `*.suo` file (which stores local settings and might be a hidden file). – Codor Dec 14 '15 at 15:42

3 Answers3

79

Resharper , run configuration was the culprit in this case. The change was caused by that

Anders Nilsson
  • 1,465
  • 12
  • 12
75

ReSharper -> Tools -> Run Configurations...

I like to delete all the run configurations I find in that menu.

enter image description hereenter image description here

Jacob Brewer
  • 2,574
  • 1
  • 22
  • 25
  • 6
    Thanks, I hate having so many stupid tools messing each other up. – Bohdan Apr 19 '16 at 03:50
  • 1
    Resharper is a great productivity tool, although sometimes I am disappointed by their ability to test or think things through. I doubt there are any automated tests or serious UI planning sessions for anything more than surface deep going on at Jetbrains. They have some real rock stars to work this way and have their tool work so well. – Jacob Brewer Apr 19 '16 at 13:25
  • Thanks, thought I was going insane. I suspected ReSharper, but I had disabled it... thinking that would take it out of the picture. – codah May 29 '20 at 01:50
10

I had this experience after using the Resharper command 'Create Run Configuration' on a unit-test project. Thereafter, using F5 would always try (unsuccessfully) to run that project, and switch my default. I worked around it by running 'Create Run Configuration' again on the project I want to run.

I reported this as a bug at https://resharper-support.jetbrains.com/hc/en-us/requests/853379?flash_digest=cf3e117b89155bb0dcffa49c21f732b49d461f49

JohnT
  • 416
  • 6
  • 8