2016-03-22 60 views
0

我在VS2015中有两种不同的解决方案,并且它们都有Tools > Options > Projects and Solutions > Build and Run中的方框For new solutions use the currently selected project as the startup project具有相同设置的两种解决方案在Visual Studio 2015中显示不同的行为

但只是其中一个解决方案允许我通过单击该项目或其任何依赖关系来更改要运行的新项目。对于其他解决方案,我必须使用鼠标右键单击项目并选择Set as startup project

究竟是什么让这两种解决方案有这样的不同行为?

回答

2

这是解决方案的一个设置。

右键单击您的解决方案

Properties -> Common Properties -> Startup Project -> Current Selection

当前选择选项与单启动项目多启动项目一个单选按钮是你的其他2个选项

enter image description here

CheckBox

Tools -> Options... -> Projects and Solutions -> Build and Run

enter image description here

用来设置默认为创建

+0

非常感谢任何新的Visual Studio解决方案之前描述的设置。很好的答案。我不知道这个选项。但是,在'Tools'中暗示的框的目的是什么? – Mao

+0

@ChairmanMao没问题。不确定我知道你提到的框中的含义 –

+0

在我的问题中提到的“工具>选项>项目和解决方案>构建和运行”中打勾的框。 – Mao

相关问题