如何将Visual Studio的“我的代码片段"文件夹移动到另一个驱动器? [英] How to move Visual Studio's 'My Code Snippets' folder to another drive?
问题描述
一个我找不到设置或答案的简单问题:
A simple question for which I couldn't find a setting or an answer:
我将Windows中的 Documents 文件夹重定位到了另一个驱动器.如何将Visual Studio 2012中的我的代码片段文件夹路径从默认位置更改为新位置?
I relocated my Documents folder in Windows to another drive. How do I change the My Code Snippets folder path in Visual Studio 2012 from the default to the new location?
默认设置在C:上的我的文档"文件夹中.
The default is in my Documents folder on C:.
C:\Users\Virtlink\Documents\
Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets
但是我将我的Documents文件夹移动到了驱动器D :,但是Visual Studio并未进行此更改,而是在C:上强制创建了该文件夹.这会导致一些奇怪的行为,在代码段管理器中的My Code Snippets
旁边带有感叹号,并导致导入代码段时出错.
But I moved my Documents folder to my drive D:, but Visual Studio didn't pick up on this change and forces the creation of the folder on C:. This causes some weird behavior with exclamation marks next to My Code Snippets
in the Code Snippets Manager, and errors on importing snippets.
当我从用户文件夹中打开我的文档"时,Windows将我定向到的文件夹是D:\Personal\
,我也希望在那里的代码段:
The folder Windows directs me to when I open My Documents from my user folder is D:\Personal\
, and I want the code snippets there too:
D:\Personal\Visual Studio 2012\Code Snippets\Visual C#\My Code Snippets
如有必要,我不介意移动整个Visual Studio 2012子文件夹.我只是不知道如何在Visual Studio中进行设置.
If necessary, I wouldn't mind moving the whole Visual Studio 2012 subfolder. I just can't find out how to set that in Visual Studio.
推荐答案
UI并不完全清楚按钮的用途,但这实际上可以通过两个简单步骤完成:
The UI doesn't make it completely obvious what the buttons are for, but this can actually be done in two simple steps:
第1步.在代码片段管理器"中,选择指向不再使用的磁盘位置的文件夹,然后单击删除":
Step 1. In Code Snippets Manager, select the folder that points to the disk location you no longer use, and click Remove:
第2步.点击添加...
...并选择您的新文件夹:
...and select your new folder:
就是这样!您的新文件夹现在在代码片段管理器"中处于活动状态.
That's it! Your new folder is now active in Code Snippets Manager.
这篇关于如何将Visual Studio的“我的代码片段"文件夹移动到另一个驱动器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!