在 PC 之间传输所有 ReSharper 设置

发布于 2024-07-21 05:49:26 字数 100 浏览 6 评论 0原文

我想知道是否有办法将 ReSharper 中的所有设置(包括 ReSharper 设置的 StyleCop 和我为 ReSharper 设置的键盘绑定)从一台 PC 复制到另一台 PC?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

一袭白衣梦中忆 2024-07-28 05:49:27

由于 Resharper 中的导出选项仅适用于代码样式,因此您需要对所有设置更加巧妙。

来自 彼得·里奇的博客...

...设置存储在
“%用户配置文件%\应用程序
数据\jetbrains\resharper\v4.0\vs9.0”。
里面有几个xml文件
那里存储您的设置。
在升级到最新版本之前
构建,只需将它们复制到另一个
目录。

很可能是这样的格式
这些文件自上次以来已更改
构建如此复制备份
新版本可能会使
重新磨刀至爆炸。 所以,使用
小心。

我有 Resharper 4.1,所以不是“...\v4.0\vs9.0”,它实际上是“...\v4.1\vs9.0”(很明显,我知道,但值得一提)。

我不确定 StyleCop 设置,但这应该适用于大多数其他设置(键盘方案、代码完成设置等...)。

Since the export option within Resharper is only for code styles, you'll need to be a bit craftier for all settings.

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.

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).

I'm not sure about StyleCop settings, but this should work for most other settings (keyboard scheme, code completion settings, etc...).

凉月流沐 2024-07-28 05:49:27

resharper 有一个 R# 设置管理器 插件,它存储了我认为的所有内容,包括 stylecop 设置

There is a R# settings manager plugin for resharper that stores all of this I think, including stylecop settings

凶凌 2024-07-28 05:49:27
  1. 打开 Visual Studio
  2. 转到 Resharper > 管理选项
  3. 单击导入和导出

导入和导出

  1. 单击“导出到文件”
  2. 勾选所有复选框

在此处输入图像描述

  1. 单击“确定”并将文件保存到所需位置

  2. 要将设置导入到其他计算机,请重复步骤 1-3,然后选择从文件导入。 您已完成。

享受!

  1. Open Visual Studio
  2. Go to Resharper > Manage Options
  3. Click on Import and Export

Import and Export

  1. Click on Export to File
  2. Tick all check box

enter image description here

  1. Click on OK and save the file to your desired location

  2. To import the settings to other computer, repeat steps 1-3 and then select Import from File. You are done.

Enjoy!

叹梦 2024-07-28 05:49:27

您可以导出/导入您的 ReSharper 代码样式或将其放在网络上并在多台计算机之间共享。 为此:

从 VS 菜单中选择 ReSharper -> 然后在选项对话框中选择语言/通用/代码样式共享。

不确定这是否正是您正在寻找的。

You can Export/Import your ReSharper Code Style or put it on the network and share between multiple computers. To do so:

From VS Menu select ReSharper -> Options then in Option dialog select Languages/Common/Code Style Sharing.

Not sure if it's exactly what you're looking for.

枯叶蝶 2024-07-28 05:49:27

StyleCop 设置不存储在 resharper 插件中。 它们位于 stylecop 目录和 xml 文件 (Settings.StyleCop) 中。

StyleCop settings are not stored in the resharper plugin. they are in the stylecop directory and in an xml file (Settings.StyleCop).

娇女薄笑 2024-07-28 05:49:27

我有一个正在使用的解决方案!

Skydrive 和 Junction 连接魔法。
我在文件系统中创建一个连接,将设置指向 skydrive 文件夹。
这样我在使用 skydrive 的任何地方都可以使用相同的设置!

在目标电脑上我做相反的事情。

希望这可以帮助。

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!!!

On the target pc i do the opposite.

Hope this helps.

定格我的天空 2024-07-28 05:49:27

Steve Dignan 的答案对于 2009 版 Resharper 来说可能是正确的。

在较新版本的 Resharper 中,PC Resharper 全局设置位于:
%userprofile%\Appdata\Roaming\JetBrains\Shared\vAny\GlobalSettingsStorage.DotSettings

解决方案团队共享设置位于名为 {Solution Name}.sln.DotSettings 的解决方案文件夹中。

解决方案的个人设置位于{Solution Name}.sln.DotSettings.user 中。

来源: https://resharper-support.jetbrains.com/hc/en-us/articles/115001216530-Where-to-find-DotSettings-files-linked-with-settings-layers

所以要转移在 2 台 PC 之间进行设置,复制要传输的相应层的设置文件即可。 通常只需复制全局就足够了。

Steve Dignan's answer is probably correct for 2009 version of Resharper.

In newer versions of Resharper global for PC Resharper settings are located in:
%userprofile%\Appdata\Roaming\JetBrains\Shared\vAny\GlobalSettingsStorage.DotSettings.

Solution team-shared settings are in the solution folder called {Solution Name}.sln.DotSettings.

Solution's personal settings are in {Solution Name}.sln.DotSettings.user.

Source: https://resharper-support.jetbrains.com/hc/en-us/articles/115001216530-Where-to-find-DotSettings-files-associated-with-settings-layers

So to transfer settings between 2 PCs, copy settings file(s) for the appropriate layer(s) you want to transfer and that's it. Usually just copying global is enough.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文