Custom Pattern and solution shared settings

I have created a Custom Pattern and set it to warning level. This works perfect on my computer.
I have saved the settings to the solution settings file and it has been distributed to the team using source control.

But the pattern is recognized only on my PC now, not on the others.
I have checked the XY.sln.DotSettings file and noticed that there exists only following entry:

<s:String x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=67D93A264FC4854D821182BF69E7ED49/Severity/@EntryValue">WARNING</s:String>

It seems that this is a reference to the pattern, but not the pattern itself. 
So my assumtion is that the team has get the reference now, but not the pattern and therefore no warning is displayed within code.

Can someone tell me where the pattern itself is stored? 
Or are we missing something during distribution of the settings?

Any help is very much appreciated.

0
4 comments

Hello Andreas,
thank you for contacting us.
I've tried to create a Custom Pattern and save it to the team-shared layer. As a result, I can see the following entries in XY.sln.DotSettings file:

<s:Boolean x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/@KeyIndexDefined">True</s:Boolean>
    <s:Boolean x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/IsReplacePattern/@EntryValue">True</s:Boolean>
    <s:String x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/LanguageName/@EntryValue">CSHARP</s:String>
    <s:Boolean x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/MatchCatchClauseWithoutExceptionFilter/@EntryValue">False</s:Boolean>
    <s:String x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/ReplacePattern/@EntryValue">222</s:String>
    <s:String x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/SearchPattern/@EntryValue">111</s:String>
    <s:String x:Key="/Default/PatternsAndTemplates/StructuralSearch/Pattern/=21654568E035C843B1818D46C58AD7AA/Severity/@EntryValue">WARNING</s:String>

So it works as expected on my side. Also, please take a look at the gif below.

Please try to create a custom pattern again and ensure you save everything related to the pattern to the team layer, not only the warning level.

Thank you!

0
0

Hi Olga, 
thanks for your instructions - I have followed them now and was able to distribute the pattern as expected.

I believe the fault was, that I have used right click “Search with pattern” as described here:
Add/Edit/Search with Highlighting Pattern dialog | ReSharper Documentation (jetbrains.com)

But it seems that the pattern itself is saved to another location in this case.

Nevermind, everything is working now - thanks for your support!

Regards
Andreas

0
Hi Andreas,
thank you for letting me know.
Please feel free to contact us if you have any problems or questions.
Thank you!
0

Please sign in to leave a comment.