visual-studio 如何更改默认打开文件对话框路径

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3742723/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 12:28:02  来源:igfitidea点击:

How to change the default open file dialog path

visual-studio

提问by Pete

In Visual Studio (I'm using 2010) is there a way to change which folder pops up by default when you go to open a file?

在 Visual Studio(我使用的是 2010)中,有没有办法更改打开文件时默认弹出的文件夹?

回答by Sebastian

For Visual Studio 2017 and 2019you'll have to navigate from Tools->Options (Alt+T, O)then Projects and Solutions->Locations, there are 3 Locations but you will only need to edit the Projects locationand click OK. No need to restart VS.

对于Visual Studio 2017 和 2019,您必须从Tools->Options (Alt+T, O)然后Projects and Solutions->Locations导航 ,有 3 个位置,但您只需要编辑Projects 位置并单击OK。无需重启VS。

回答by Michael Beaton

There are a bunch of file locations in the registry at HKCU\Software\Microsoft\VisualStudio\10.0. The one you need to change is DefaultFileOpenLocation.

注册表中有一堆文件位置在 HKCU\Software\Microsoft\VisualStudio\10.0。您需要更改的是 DefaultFileOpenLocation。

回答by Daniel James Bryars

Yes in Tools->Options->Projects and Solutions->General

是在工具->选项->项目和解决方案->常规

回答by ALomaka

Also works for VS 2013. Root registry key is HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0.

也适用于 VS 2013。根注册表项是 HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0。

回答by Pete

When you click the open project button the dialog that pops up defaults to something strange, I've yet to be able to figure it out (I think it might be because I am using Dropbox). At any rate, clicking the Projects link on the left (the red arrow points to it) will take you directly to the directory you specified to put new projects in. This is Windows 7 64-bit with SP1. YMMV

当您单击打开项目按钮时,弹出的对话框默认为奇怪的东西,我还没有弄清楚(我想可能是因为我使用的是 Dropbox)。无论如何,单击左侧的“项目”链接(红色箭头指向它)会将您直接带到您指定用于放置新项目的目录。这是 Windows 7 64 位 SP1。青年会

Win7 Open File Dialog

Win7 打开文件对话框

回答by Peter McClintock

I'm using VS 2017 and was being brought to the same directory time and time again, one I had not opened for a few months despite opening and creating dozens of projects afterwards. I tried resetting via Tools > Options, but to no avail. I finally created a txt file in the directory I wanted as my default and opened that through the dialog and now it's working again.

我正在使用 VS 2017 并且一次又一次地被带到同一个目录中,尽管后来打开并创建了数十个项目,但我已经几个月没有打开过。我尝试通过工具 > 选项重置,但无济于事。我终于在我想要的目录中创建了一个 txt 文件作为我的默认文件并通过对话框打开它,现在它又可以工作了。