简体   繁体   English

如何在Visual Studio 2010中更改.sln文件的默认位置?

[英]How to change default location of .sln file in Visual Studio 2010?

I'd like my .sln to always live within my project folder. 我希望我的.sln始终位于我的项目文件夹中。 How can I make this the default behavior when creating a new project? 创建新项目时如何使它成为默认行为?

To change the creation location for a new website, you can change this registry key: 要更改新网站的创建位置,可以更改以下注册表项:

HKCU\Software\Microsoft\VisualStudio\10.0\
    NewProjectDialog\MRUSettingsVenusProjectLocationEntries\Value0

As it is a Most Recently Used setting it may update after you choose a new location for a website. 由于它是“最近使用”的设置,因此在为网站选择新位置后它可能会更新。

There are keys under the "10.0" root ending in "Location" which can be changed in a similar fashion to affect the default directories for projects and other things. 在“ 10.0”根目录下有一些以“ Location”结尾的键,可以通过类似的方式进行更改,以影响项目和其他内容的默认目录。

As always, take care when modifying the Registry or you may break VS. 和往常一样,修改注册表时要小心,否则可能会破坏VS。

Uncheck the "Create directory for solution" checkbox when you save the solution for the first time. 首次保存解决方案时,请取消选中“为解决方案创建目录”复选框。 Visual Studio memorizes this choice, it will stay unchecked when you create and save new solutions, until you change it again. Visual Studio会记住该选择,在您创建和保存新解决方案时,它将保持选中状态,直到再次更改它为止。

这是“ Visual Studio解决方案的ShellNew扩展”,您可以使用它,网址为http://www.peterprovost.org/blog/post/ShellNew-Extension-for-Visual-Studio-Solutions.aspx

On the new project window uncheck the box that says Create directory for solution . 在新项目窗口中,取消选中“ Create directory for solution ”框。

or are you asking how to make it so that box is unchecked by default? 还是您在问如何制作它,以便默认情况下未选中该框?

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM