代码之家  ›  专栏  ›  技术社区  ›  Pete

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

  •  29
  • Pete  · 技术社区  · 16 年前

    在visualstudio(我使用的是2010)中,有没有一种方法可以更改打开文件时默认弹出的文件夹?

    6 回复  |  直到 16 年前
        1
  •  73
  •   Sebastian yagger    7 年前

    为了 Visual Studio 2017和2019 你必须从 工具->选项(Alt+T,O) 项目和解决方案->位置 ,有3个位置,但您只需编辑 项目位置 然后单击 好的 . 无需重启VS。

        2
  •  25
  •   Michael Beaton    15 年前

        3
  •  13
  •   Daniel James Bryars    16 年前

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

        4
  •  1
  •   Pete    15 年前

    当你点击“打开项目”按钮时,弹出的对话框默认为一些奇怪的东西,我还没有弄清楚(我想可能是因为我使用的是Dropbox)。无论如何,单击左侧的Projects链接(红色箭头指向该链接)将直接将您带到指定的目录,以便将新项目放入其中。这是Windows7 64位SP1。基督教青年会

    Win7 Open File Dialog

        5
  •  1
  •   ALomaka    12 年前

    也适用于VS 2013。根注册表项为HKEY\ U CURRENT\ U USER\Software\Microsoft\VisualStudio\12.0。

        6
  •  1
  •   Marcos Dimitrio Thierry Templier    6 年前

    Developer Command Prompt for VS 2019 “与vsregedit.exe文件如中所述 this post . 添加到windows注册表失败。

    在中的VS2015的windows注册表项中 HKCU\Software\Microsoft\VisualStudio\14.0 ,以前有:

    DefaultFileOpenLocation
    DefaultOpenProjectLocation
    DefaultOpenProjItemLocation
    DefaultOpenSolutionLocation
    DefaultNewProjectLocation
    DefaultNewProjItemLocation
    VisualStudioLocation
    VisualStudioProjectsLocation
    

    您可以使用vsregedit更改这些键中的任何一个。其中一些可以从界面、工具->选项、项目和解决方案->位置或通过 Git Settings for the Default Repository Location . 我必须通过vsregedit更改的是:

    DefaultFileOpenLocation
    DefaultNewProjItemLocation
    DefaultOpenProjItemLocation
    

    您可以通过以下方式读取当前值:

    vsregedit read local HKCU "" DefaultNewProjItemLocation string
    

    输出类似于:

    Name: DefaultNewProjItemLocation, Value: %USERPROFILE%\source\repos
    

    要更改值,可以使用:

    vsregedit set local HKCU "" DefaultFileOpenLocation string "C:\Visual Studio Projects"
    vsregedit set local HKCU "" DefaultNewProjItemLocation string "C:\Visual Studio Projects"
    vsregedit set local HKCU "" DefaultOpenProjItemLocation string "C:\Visual Studio Projects"
    

    Name: DefaultNewProjItemLocation, Value: C:\Visual Studio Projects
    
        7
  •  0
  •   Peter McClintock    7 年前