C# 在 PC 之间传输所有 ReSharper 设置
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/885443/
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
Transfer all ReSharper Settings between PCs
提问by Chris Watts
I was wondering if there is a way to copy ALL my settings from ReSharper (including the StyleCop for ReSharper settings and the keyboard bindings I have set for ReSharper) from one PC to another?
我想知道是否有办法将 ReSharper 中的所有设置(包括用于 ReSharper 设置的 StyleCop 和我为 ReSharper 设置的键盘绑定)从一台 PC 复制到另一台 PC?
采纳答案by Steve Dignan
Since the export option within Resharper is only for code styles, you'll need to be a bit craftier for allsettings.
由于 Resharper 中的导出选项仅适用于代码样式,因此您需要对所有设置更加巧妙。
From Peter Ritchie's blog...
来自彼得里奇的博客......
...the settings are stored in "%userprofile%\application data\jetbrains\resharper\v4.0\vs9.0". There are a couple of xml files in there that store your settings. Before you upgrade to the latest build, just copy those to another directory.
It's very likely that the format of these files has changed since the last build so copying the backups over the new version could possibly make Resharper to blow-up. So, use with caution.
...设置存储在“%userprofile%\application data\jetbrains\resharper\v4.0\vs9.0”中。那里有几个 xml 文件用于存储您的设置。在升级到最新版本之前,只需将它们复制到另一个目录。
这些文件的格式很可能自上次构建以来发生了变化,因此将备份复制到新版本可能会使 Resharper 崩溃。因此,请谨慎使用。
I have Resharper 4.1 so instead of "...\v4.0\vs9.0" it's actually "...\v4.1\vs9.0" (obvious, I know, but worth mentioning).
我有 Resharper 4.1 所以不是“...\v4.0\vs9.0”,它实际上是“...\v4.1\vs9.0”(很明显,我知道,但值得一提)。
I'm not sure about StyleCop settings, but this should work for most other settings (keyboard scheme, code completion settings, etc...).
我不确定 StyleCop 设置,但这应该适用于大多数其他设置(键盘方案、代码完成设置等)。
回答by Ali Shafai
StyleCop settings are not stored in the resharper plugin. they are in the stylecop directory and in an xml file (Settings.StyleCop).
StyleCop 设置不存储在 resharper 插件中。它们位于 stylecop 目录和 xml 文件 (Settings.StyleCop) 中。
回答by Vadim
You can Export/Import your ReSharper Code Style or put it on the network and share between multiple computers. To do so:
您可以导出/导入您的 ReSharper 代码样式或将其放在网络上并在多台计算机之间共享。这样做:
From VS Menu select ReSharper -> Options then in Option dialog select Languages/Common/Code Style Sharing.
从 VS 菜单中选择 ReSharper -> 选项,然后在选项对话框中选择语言/通用/代码样式共享。
Not sure if it's exactly what you're looking for.
不确定这是否正是您要找的。
回答by Daniel Powell
There is a R# settings managerplugin for resharper that stores all of this I think, including stylecop settings
有一个用于 resharper的R# 设置管理器插件,可以存储我认为的所有内容,包括 stylecop 设置
回答by Mantzas
I have a solution that i am using!
我有一个我正在使用的解决方案!
Skydrive and junction link magic. I create a junction in the filesystem that point the settings to a skydrive folder. this way i have everywhere i use skydrive the same settings!!!
Skydrive 和路口链接魔术。我在文件系统中创建了一个连接点,将设置指向一个 skydrive 文件夹。这样我到处都使用skydrive相同的设置!!!
On the target pc i do the opposite.
在目标电脑上,我做相反的事情。
Hope this helps.
希望这可以帮助。
回答by Yasirmx
- Open Visual Studio
- Go to Resharper > Manage Options
- Click on Import and Export
- 打开 Visual Studio
- 转到 Resharper > 管理选项
- 点击导入和导出
- Click on Export to File
- Tick all check box
- 单击导出到文件
- 勾选所有复选框
Click on OK and save the file to your desired location
To import the settings to other computer, repeat steps 1-3 and then select Import from File. You are done.
单击“确定”并将文件保存到所需位置
要将设置导入其他计算机,请重复步骤 1-3,然后选择从文件导入。你完成了。
Enjoy!
享受!