如何阻止 Visual Studio 自动创建解决方案文件 [英] How to stop Visual Studio from automatically creating solution files

查看:222
本文介绍了如何阻止 Visual Studio 自动创建解决方案文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的项目通常存储为单个项目,而不是更大解决方案的一部分.当我打开一个项目时,Visual Studio 会在我的文件夹中创建一个解决方案 (sln) 和解决方案选项 (suo) 文件.我想停止这种自动 sln 和 suo 创建,有人知道如何去做吗?

Our projects are typically stored as single projects, and are not part of a larger solution. When I open a project, Visual studio creates a solution (sln) and soution options (suo) file in my folder. I want to stop this automatic sln and suo creation, Does anybody know how to go about doing this?

我们有几十个单独的项目,当我与源代码管理进行比较以找到需要添加/签入的项目时,这两个项目总是在每个项目的列表中乱七八糟.

We have several dozen individual projects, and when I do a compare to source control to find the items that need to be added/checked in, these 2 are always crapping up the list for each project.

推荐答案

我通常只是取消选中为解决方案创建目录",以便将 SLN 文件放在同一文件夹中,然后我手动删除它们我关闭项目的时间.除非您做一些值得解决的事情(例如,添加第二个项目),否则 VS 不会重新创建它们.

I usually just un-check "Create directory for solution" so that it puts the SLN file in the same folder, and then I delete them by hand the first time I close the project. VS won't recreate them unless you do something solution-worthy (add a second project, for example).

没有本地方法可以避免生成它们.

There's no native way to avoid generating them.

这篇关于如何阻止 Visual Studio 自动创建解决方案文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆