Reputation: 1757
I am struggling to find a solution to stop Visual studio to Auto Format
my .Designer.vb
file.
I have turned off Pretty Listing
under
Options > Text Editor > Basic > Advanced
However it still wants to format my designer file when I save changes.
Here are one example when I compare against original
Previous
Me._lstview_ColumnHeader_1 = CType(New System.Windows.Forms.ColumnHeader(),System.Windows.Forms.ColumnHeader)
After Saving
Me._lstview_ColumnHeader_1= CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
You can see above it has added space between , System.Windows.Forms.ColumnHeader
Many places has had the above.
Also some places have had bracket ()
removed and True
changed to true
I am not exactly sure what else could be causing this?
I am also using ReSharper and have turned off
the following options and still no luck
Am I missing something?
Upvotes: 1
Views: 778
Reputation: 54477
You can't stop it because it's not happening. Your designer code file isn't being reformatted. It's being rewritten. That's exactly why it is recommended that you don't make changes to that file by hand. Every time you make changes in the designer, the IDE rewrites that file. That's it, that's all. Generally speaking, the only reason that you should be making changes in that file is if a VS bug broke it and you need to fix it. Other genuine reasons might include replacing a standard control with a derived control that adds functionality. You shouldn't really care what the designer code file looks like anyway, because you should pretty much never be in there.
Upvotes: 3