Rider is deleting code when auto formatting

I don't know why it happens, but sometimes when Rider auto formats a form file a few Images go missing. This is happening only to button Images as far as I know but not to all of them (they are all coded the same way though). Here is a few git diff screen shots to help to see the issue:

These changes are exclusively Rider stock auto formatting, I didn't change/import a single formatting setting.

0
8 comments

Hello,

Could you please clarify the exact action you run to reproduce this issue?

 

0
Avatar
Permanently deleted user

Hi Sofia, thanks for reaching out.

This happens every time I open a file and Rider auto formats it. All I have to do is open a .designer file and Rider will automatically format it by doing some small syntax changes as you can see in the first screen shot with the added space between '(byte)' and '(0)' (I guess I forgot to mention that all of the changes in the screen shots are caused by the auto formatting, my bad) but if the file also contains an Image imported with the namespace (like global:SPAA:Properties:Resources... ) than it will be automatically removed along with the other added small changes.

0

Hello,

Thank you for the clarification.

Could you please check if your project contains a self-reference? If it does, try to remove it and check if the issue occurs.

If no, please share all your .DotSettings files:

- *Personal layer*: ```.DotSettings.user``` file near your sln (if any)
- *Team-shared layer*: ```.DotSettings``` file near your sln (if any)
- *Global settings layer*: Use "Help -> Browse Special Files and Folders -> R# Global Settings" to locate ```GlobalSettingsStorage.DotSettings``` file

0
Avatar
Permanently deleted user

It appears that my project does not contain a self-reference, as I couldn't find it in the Solution Explorer along with the others references. I will post the .DotSettings files that I was able to find.

.DotSettings.user

<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FClasses_002FFuzzy_002FForms_002FVariaveis_005FSaida/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FClasses_002FTutorial_002FTela_005FGerenciamento/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FClasses_002FVarExtern_002FAvaliarFuncaoExterna/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FGerenciamento_005FVar_005FExtern/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FLogin/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FLogInfo/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FMainForm/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FManual_005FIntegrado/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FN_00E3o_0020Conformidades_002FLayout_005FNao_005FConformidades/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FReconciliation_002FCadastro_005FClasses_005FProdutos/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FReconciliation_002FCalculo_005Fdx/@EntryIndexedValue">False</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/CheckedGroups/=Framework_002FForms_002FRelat_00F3rios_002FRelatorioLogicas/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/ResxEditorPersonal/Initialized/@EntryValue">True</s:Boolean></wpf:ResourceDictionary>

GlobalSettingsStorage.DotSettings

<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeStyle/Naming/CSharpAutoNaming/IsNotificationDisabled/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/DesignerToolboxComponentManager/DesignerToolboxFrameworkVisibleState/@EntryValue">C:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Windows.Forms\v4.0_4.0.0.0__b77a5c561934e089\System.Windows.Forms.dll|System.Windows.Forms.Button;System.Windows.Forms.ComboBox;System.Windows.Forms.RadioButton;System.Windows.Forms.RichTextBox;System.Windows.Forms.TextBox</s:String>
<s:Boolean x:Key="/Default/Environment/ExternalSources/Decompiler/DecompilerLegalNoticeAccepted/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=TabNavigationExplainer/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/GlobalSettingsUpgraded/IsUpgraded/@EntryValue">True</s:Boolean>
<s:Boolean x:Key="/Default/Housekeeping/FeatureSuggestion/FeatureSuggestionManager/DisabledSuggesters/=SwitchToGoToActionSuggester/@EntryIndexedValue">True</s:Boolean>
<s:String x:Key="/Default/SnapshotsStore/CurrentStore/@EntryValue">C:\Users\narci\AppData\Roaming\JetBrains\Rider2020.3\resharper-host\Sessions</s:String>
<s:Boolean x:Key="/Default/SymbolServers/RestoreDecompileSetting/@EntryValue">False</s:Boolean>
<s:String x:Key="/Default/GlobalFilterSettingsManager/AppliedDefaultAttributeFilterString/@EntryValue">;System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute;System.CodeDom.Compiler.GeneratedCodeAttribute;Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode*</s:String>
<s:String x:Key="/Default/GlobalFilterSettingsManager/AttributeFilterXml/@EntryValue">&lt;data&gt;&lt;AttributeFilter ClassMask="System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute" IsEnabled="True" /&gt;&lt;AttributeFilter ClassMask="System.CodeDom.Compiler.GeneratedCodeAttribute" IsEnabled="True" /&gt;&lt;AttributeFilter ClassMask="Microsoft.VisualStudio.TestPlatform.TestSDKAutoGeneratedCode*" IsEnabled="True" /&gt;&lt;/data&gt;</s:String></wpf:ResourceDictionary>

I couldn't find the team-shared one, only the .user was along the sln.

0

Thank you
Could you please clarify your Rider version (menu Help | About)? 

0
Avatar
Permanently deleted user

It's Version 2020.3.2 Build #RD-203.6682.21, built on December 29 2020

0

Hi,

Thank you,

Unfortunately, I still cannot reproduce this issue even with your settings applied.

Could you please file a new ticket on youtrack https://youtrack.jetbrains.com/ and attach your solution?

0

Actually, there was indeed a similar issue: https://youtrack.jetbrains.com/issue/RIDER-34366. But it was fixed in 2020.1. Maybe the case you have is related somehow.

0

Please sign in to leave a comment.