简体   繁体   English

如何配置.sln Visual Studio Project文件存储在项目文件夹中?

[英]How to configure .sln Visual Studio Project file to be stored in the project folder?

I come from Visual Studio 2008, where the .sln file used to be stored in the project folder. 我来自Visual Studio 2008,其中.sln文件曾经存储在项目文件夹中。 Now I see it is stored in documents\\Visual Studio 2010\\Projects\\ProjectName\\, which I don't like at all. 现在我看到它存储在Documents \\ Visual Studio 2010 \\ Projects \\ ProjectName \\中,我根本不喜欢它。

How can I store it automatically in the project folder? 如何将其自动存储在项目文件夹中? Without cutting and pasting it each time I open a new project... 每次我打开一个新项目时都不会剪切和粘贴它......

A screenshot with a Big Red Arrow on the relevant controls: 相关控件上带有大红色箭头的屏幕截图:

在此输入图像描述

The "Create directory for solution" checkbox is ticked by default. 默认情况下勾选“创建解决方案目录”复选框。 Turn it off to get the project stored in the same directory as the solution. 将其关闭以使项目存储在与解决方案相同的目录中。 VS memorizes the last setting you used. VS会记住您使用的最后一个设置。

The "Location" property determines where the solution is stored. “位置”属性确定解决方案的存储位置。 The default is the path that you complain about. 默认值是您抱怨的路径。 Just edit it. 只需编辑它。 Or change the default setting like I did: Tools + Options, Projects and Solutions, General, "Projects location" setting. 或者像我一样更改默认设置:工具+选项,项目和解决方案,常规,“项目位置”设置。

You can change the path where new projects and files are created by using the Options dialog box. 您可以使用“选项”对话框更改创建新项目和文件的路径。 Your existing projects remain in their current location. 您现有的项目仍保留在当前位置。

  1. On the Tools menu, select Options. 在“工具”菜单上,选择“选项”。
  2. From the Projects and Solutions folder, select General. 从Projects and Solutions文件夹中,选择General。
  3. In the Visual Studio projects location text box, enter a location for files and projects. 在Visual Studio项目位置文本框中,输入文件和项目的位置。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何重定位 Visual Studio 项目 (.sln) 文件 - How to Relocate Visual Studio project (.sln) file 找不到Teamcity Visual Studio sln目标(项目文件夹中的项目) - Teamcity Visual Studio sln Targets not found (projects inside project folder) Visual Studio不断更改project.sln文件 - Visual Studio keeps changing project.sln file 没有sln文件时使用Visual Studio 2015打开解决方案/项目 - Opening Solution / Project with Visual studio 2015 when there is no sln file 如何在与Web项目相同的目录中创建Visual Studio解决方案文件(.sln)? - How do you create a Visual Studio Solution File (.sln) in the same directory as the web project? 如果ASP.NET 5项目/解决方案没有SLN文件,如何在Visual Studio 2015 Update 1中打开它? - If an ASP.NET 5 project/solution has no SLN file how do I open it in Visual Studio 2015 Update 1? 将基于project.json的项目添加到.sln文件而不使用Visual Studio - Add a project.json based project to a .sln file without using Visual Studio 打开Visual Studio 2008 sln文件创建一个Visual Studio文件夹 - Opening a Visual Studio 2008 sln file creates a Visual Studio folder 如何在多项目sln模板Visual Studio 2015中添加现有项目 - How to add existing project in multi project sln template Visual Studio 2015 Visual Studio-如何在MVC项目中将文件/文件夹标记为“不发布”? - Visual Studio - how to mark file/folder in MVC project as Do Not Publish?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM