Import settings broken?

Answered

I'm just setting up a new Visual Studio 2015 instance with R# 2016.2.2. When i import my settings from another installation (also Visual Studio 2015 and Resharper 2016.2.2) i'm missing my settings for naming style and formatting style. This is the same for 2016.3 EAP 4. Is this a feature or is the import broken?

Regards

Andreas

4 comments
Comment actions Permalink

Hello Andreas,

Have you ever had ReSharper 7.x or 8.x installed on another machine where you exported settings from? ReSharper versions prior 9.0 build has another settings file location and it is still attached as a settings layer to the latest ReSharper builds, but it is hidden in UI. So please check if the following file exists on a disk "%AppData%\JetBrains\ReSharper\vAny\GlobalSettingsStorage.DotSettings". If so, there might be that such file contains "naming style and formatting style" settings you are looking for.

Thanks! 

0
Comment actions Permalink

Hi Alexander,

 

I’m using R# since Release 1.0 :-)). I have always exported / imported my settings when i setup a new PC and i can‘t remember on any problems in the past.

I have found the file in the folder “%AppData%\Roaming\JetBrains\Shared\vAny” and my customs settings seems to be there. In this file I can find my naming and code style settings.

I have checked the export file and in my opinion the custom c# naming and formatting styles are present

These are some of my my custom settings:

    <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="m" Suffix="" Style="AaBb" /&gt;</s:String>
    <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /&gt;</s:String>
    <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=2abe2fff_002D7027_002D485d_002D9c09_002Dba90fd8ae9d5/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Public" Description="Lambda Parameters"&gt;&lt;ElementKinds&gt;&lt;Kind Name="LAMBDA_PARAMETER" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;&lt;/Policy&gt;</s:String>

<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_EXTENDS_LIST_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
    <s:Int64 x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_LIMIT/@EntryValue">130</s:Int64>
    <s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/WRAP_PARAMETERS_STYLE/@EntryValue">CHOP_IF_LONG</s:String>
   

Unfortunately i can't upload files here so i have put the GlobalSettingsStorage.DotSettings and my export file on my Ondrive. Feel free to download it from https://1drv.ms/f/s!AkmFlcC-2WFChwc8JZnLkZ8nJ2IP and investigate yourself.

Regards

Andreas

 

0
Comment actions Permalink

Hello Andreas,

Thanks for the reply and for being with us for such a long time as a ReSharper user. 

Glad to hear you found your settings. 

Well, since you have such file on a disk("%AppData%\JetBrains\ReSharper\vAny\GlobalSettingsStorage.DotSettings"), it explains why exporting "This Computer" layer from "Manage Options" dialog in ReSharper 2016.2.2 did not export old settings. Let me show you how it is possible.

"This Computer" layer in ReSharper 6.x/7.x/8.x was "%AppData%\JetBrains\ReSharper\vAny\GlobalSettingsStorage.DotSettings" file on a disk. So most of settings you selected/changed in those ReSharper builds were stored in that file.

When all JB .NET tools were merged to ReSharper Ultimate bundle with the single, lets say, "Platform" (common files to be integrated and run in Visual Studio), we created a new settings file ("Shared" one) which had settings for all tools, so that's why now "This Computer" layer is stored in "%AppData%\JetBrains\Shared\vAny\GlobalSettingsStorage.DotSettings" file (the difference from previous path is "Shared" instead of "ReSharper"). 

However, all previous settings were not copied to this new file, old settings file is still mounted to ReSharper (so ReSharper is still looking for the file and if it exists - ReSharper uses settings from it), but there is no way to see it in Manage Options UI. If it does not exist in UI, there is no a simple way to export/import settings stored in the file. 

As a workaround to have all settings in a single file, you may import (via "Manage Options" dialog) "%AppData%\JetBrains\ReSharper\vAny\GlobalSettingsStorage.DotSettings" file to "This Computer" layer. After that, you may export "This Computer" layer to a file to share with other machine you have.

My apologies for the inconvenience.

 

 

1
Comment actions Permalink

Hi Alexander,

first I was a little confused about your answer, but then i remember that i copied the settings originally from my companies laptop and yesterday i checked it on my private PC (there i had installed a completely new private license and made all the settings by hand). On my companies laptop i found two "GlobalSettingsStore.DotSettings files. After applying your hint my export file is 600KB instead of 32KB and all my old settings and, even more important, self defined file and live templates are inside the file.

Thanks for your help

Andreas

0

Please sign in to leave a comment.