Resharper automatically removes whitespace on run

I've been facing a weird problem in Resharper recently. When I make any bit of change on code and run, the whitespace after where the cursor is currently at are removed.

Here is an example:

public void Sample() 
{
    Console.WriteLine("Resharper");
}

Just assume that the mouse cursor is placed at the 3rd line after the semicolon. When I click 'Run', the code instantly gets reformatted and becomes like this:

public void Sample() 
{
    Console.WriteLine("Resharper");}

I could not find anything in Options. I believe that this is not a formatting issue because, in the options panel, there is no setting indicating how to apply formatting on run.

Do you have any advice?

(By the way, I am using a licensed Resharper Ultimate 2017.1 and Visual Studio 2017 Community)

1
2 comments
Official comment

Hello Ahmet,

Please follow the workaround mentioned here https://youtrack.jetbrains.com/issue/RSRP-402877:

> In my case, the linke break problem only happens if you have DevExpress components AND the Licences.licx file exists in you project. Emptying the licences.licx file in a pre-build event fixes the problem and resharper no longer removes a line break

Thanks.

Avatar
Permanently deleted user

Alexander,

You are correct that I have been using DevExpress components and there is a licenses.licx file in Properties directory. I emptied that file as you said and now it seems like the problem has gone away. You're awesome, thank you very much for helping.

0

Please sign in to leave a comment.