Change startup project automatically

前端 未结 4 459
生来不讨喜
生来不讨喜 2021-02-05 13:46

Just had an unfortunate accident in a multi-project solution where after adding a new project to the solution, writing some code and hitting F5 the project that ran

4条回答
  •  再見小時候
    2021-02-05 14:12

    You can do something in Visual Studio that allows you to run the project without worrying about setting a Startup Project and let Visual Studio decide depending on the current selection. To achieve this, right-click on the solution explorer, choose properties. Next select Startup Project, from there select Current Selection from the Radio Button List. By doing this,whatever project you highlight in the Solution Explorer (or file you select in the text editor) will now become the current startup project.

提交回复
热议问题