Visual Studio:在项目或解决方案设置上设置默认项目

编程入门 行业动态 更新时间:2024-10-26 11:20:00
本文介绍了Visual Studio:在项目或解决方案设置上设置默认项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我有一个包含多个项目的Visual Studio 2010解决方案. 其中一个项目被设置为默认项目,但是我想默认更改它.

I have a Visual Studio 2010 solution with several projects. One of the projects is set as the default project, but I want to change that by default.

我知道我可以右键单击要成为启动项目的项目,然后选择设置为启动项目",但是此设置将存储在用户的文件(.slo和.user文件)中.

I know that I can right click the project I want to be the startup project and select "Set as StartUp project", but this setting will be stored in the user's files (.slo and .user files).

根据公司政策,我们不会在源代码管理系统中检查这些文件,因此,当另一个用户打开解决方案时,它将有一个不同的项目作为启动对象.

As a company policy, we don't check these files in the source control system, therefore when another user opens the solution it will have a different project as the startup object.

还有另一种设置这些值的方法吗?像.sln或.proj文件上的设置一样?

Is there another way to set these values? Something like a setting on the .sln or .proj files?

谢谢

推荐答案

来自 Arian Kulp的站点,更改解决方案的默认启动项目的方法是编辑.sln文件.您将看到一些Project和EndProject行.列出的第一个项目将是默认的启动项目,因此只需将所需的项目移到顶部即可.

From Arian Kulp's site, the way to change the default startup project for a solution is to edit the .sln file. You'll see some Project and EndProject lines. The first Project listed will be the default startup project, so just move the one you want to the top.

更多推荐

Visual Studio:在项目或解决方案设置上设置默认项目

本文发布于:2023-05-28 12:28:16,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/320886.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:项目   解决方案   Visual   Studio

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!