Resharper compile time autoformat incorrectly changes code

219 Views Asked by At

Resharper changes below code

string strTest = "Test";
string strTest2 = "Test2";

to this

string strTest = "Test";string strTest2 = "Test2";

if cursor is at the end of the first line when I start project. It makes all breakpoints obsolete ("The breakpoint will not currently be hit. The source code is different from the original version.")

And sometimes it mixes comment line with code line and completely breaks execution. For instance:

//Comment line
string strTest = "Test";

changes to

//Comment linestring strTest = "Test";

If cursor is between double quotes it doesn't modify code. If I suspend ReSharper plugin code doesn't change on compile time so I am pretty sure that ReSharper has some problems. I tried disabling formatting on ReSharper options but it still modifies code.

How can I disable this feature? Other formatting options seems ok (Both VS and ReSharper) so if I just disable compile time auto corrections it will be ok. I couldn't find any option for this.

PS: I use VS2013 with VSCommands for VS2013 extension. ReSharper version is 10.0.2.

Solution: As @Alexander mentioned it is related to DevExpress components. Emptying the licences.licx file contents and restarting visual studio/Clean&Rebuild project resolves the issue. This prebuild-event script solves the issue.

break>$(ProjectDir)\Properties\licenses.licx
0

There are 0 best solutions below